Commit f36b7a2c authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] esp: tidy up target reference counting
  [SCSI] esp: Fix OOPS in esp_reset_cleanup().
  [SCSI] ses: Fix timeout
parents cefcade9 ec5e69f6
...@@ -2359,6 +2359,24 @@ void scsi_esp_unregister(struct esp *esp) ...@@ -2359,6 +2359,24 @@ void scsi_esp_unregister(struct esp *esp)
} }
EXPORT_SYMBOL(scsi_esp_unregister); EXPORT_SYMBOL(scsi_esp_unregister);
static int esp_target_alloc(struct scsi_target *starget)
{
struct esp *esp = shost_priv(dev_to_shost(&starget->dev));
struct esp_target_data *tp = &esp->target[starget->id];
tp->starget = starget;
return 0;
}
static void esp_target_destroy(struct scsi_target *starget)
{
struct esp *esp = shost_priv(dev_to_shost(&starget->dev));
struct esp_target_data *tp = &esp->target[starget->id];
tp->starget = NULL;
}
static int esp_slave_alloc(struct scsi_device *dev) static int esp_slave_alloc(struct scsi_device *dev)
{ {
struct esp *esp = shost_priv(dev->host); struct esp *esp = shost_priv(dev->host);
...@@ -2370,8 +2388,6 @@ static int esp_slave_alloc(struct scsi_device *dev) ...@@ -2370,8 +2388,6 @@ static int esp_slave_alloc(struct scsi_device *dev)
return -ENOMEM; return -ENOMEM;
dev->hostdata = lp; dev->hostdata = lp;
tp->starget = dev->sdev_target;
spi_min_period(tp->starget) = esp->min_period; spi_min_period(tp->starget) = esp->min_period;
spi_max_offset(tp->starget) = 15; spi_max_offset(tp->starget) = 15;
...@@ -2608,6 +2624,8 @@ struct scsi_host_template scsi_esp_template = { ...@@ -2608,6 +2624,8 @@ struct scsi_host_template scsi_esp_template = {
.name = "esp", .name = "esp",
.info = esp_info, .info = esp_info,
.queuecommand = esp_queuecommand, .queuecommand = esp_queuecommand,
.target_alloc = esp_target_alloc,
.target_destroy = esp_target_destroy,
.slave_alloc = esp_slave_alloc, .slave_alloc = esp_slave_alloc,
.slave_configure = esp_slave_configure, .slave_configure = esp_slave_configure,
.slave_destroy = esp_slave_destroy, .slave_destroy = esp_slave_destroy,
......
...@@ -61,7 +61,7 @@ static int ses_probe(struct device *dev) ...@@ -61,7 +61,7 @@ static int ses_probe(struct device *dev)
return err; return err;
} }
#define SES_TIMEOUT 30 #define SES_TIMEOUT (30 * HZ)
#define SES_RETRIES 3 #define SES_RETRIES 3
static int ses_recv_diag(struct scsi_device *sdev, int page_code, static int ses_recv_diag(struct scsi_device *sdev, int page_code,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment