Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98598
b: refs/heads/master
c: eadc49b
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller authored and James Bottomley committed Jun 24, 2008
1 parent d01a644 commit 1644391
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c95e62ce8905aab62fed224eaaa9b8558a0ef652
refs/heads/master: eadc49b1a8d09480f14caea292142f103a89c77a
8 changes: 8 additions & 0 deletions trunk/drivers/scsi/esp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,7 @@ static int esp_slave_alloc(struct scsi_device *dev)
dev->hostdata = lp;

tp->starget = dev->sdev_target;
tp->starget_ref++;

spi_min_period(tp->starget) = esp->min_period;
spi_max_offset(tp->starget) = 15;
Expand Down Expand Up @@ -2425,10 +2426,17 @@ static int esp_slave_configure(struct scsi_device *dev)

static void esp_slave_destroy(struct scsi_device *dev)
{
struct esp *esp = shost_priv(dev->host);
struct esp_target_data *tp = &esp->target[dev->id];
struct esp_lun_data *lp = dev->hostdata;

kfree(lp);
dev->hostdata = NULL;

BUG_ON(tp->starget_ref <= 0);

if (!--tp->starget_ref)
tp->starget = NULL;
}

static int esp_eh_abort_handler(struct scsi_cmnd *cmd)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/esp_scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ struct esp_target_data {
u8 nego_goal_tags;

struct scsi_target *starget;
int starget_ref;
};

struct esp_event_ent {
Expand Down

0 comments on commit 1644391

Please sign in to comment.