diff options
author | Matthew Wilcox <matthew@wil.cx> | 2007-10-02 21:55:34 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:53:37 -0400 |
commit | f092d2290f905b6e9928df6905f2fc9d18b6ae19 (patch) | |
tree | 2e64db29c40f60dc83972ce53a92488d4fe022d2 /drivers | |
parent | b352f9237622c64afbac367cadd10d23cb4c5484 (diff) |
[SCSI] advansys: Remove private lock
The board lock was essentially identical with the host lock.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/advansys.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 6bd8e835ea0f..a4091ab8d363 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -2439,7 +2439,6 @@ struct asc_board { | |||
2439 | ADVEEP_38C1600_CONFIG adv_38C1600_eep; /* 38C1600 EEPROM config. */ | 2439 | ADVEEP_38C1600_CONFIG adv_38C1600_eep; /* 38C1600 EEPROM config. */ |
2440 | } eep_config; | 2440 | } eep_config; |
2441 | ulong last_reset; /* Saved last reset time */ | 2441 | ulong last_reset; /* Saved last reset time */ |
2442 | spinlock_t lock; /* Board spinlock */ | ||
2443 | /* /proc/scsi/advansys/[0...] */ | 2442 | /* /proc/scsi/advansys/[0...] */ |
2444 | char *prtbuf; /* /proc print buffer */ | 2443 | char *prtbuf; /* /proc print buffer */ |
2445 | #ifdef ADVANSYS_STATS | 2444 | #ifdef ADVANSYS_STATS |
@@ -9621,7 +9620,7 @@ static int advansys_reset(struct scsi_cmnd *scp) | |||
9621 | } | 9620 | } |
9622 | 9621 | ||
9623 | ASC_DBG(1, "after AscInitAsc1000Driver()\n"); | 9622 | ASC_DBG(1, "after AscInitAsc1000Driver()\n"); |
9624 | spin_lock_irqsave(&boardp->lock, flags); | 9623 | spin_lock_irqsave(shost->host_lock, flags); |
9625 | } else { | 9624 | } else { |
9626 | /* | 9625 | /* |
9627 | * If the suggest reset bus flags are set, then reset the bus. | 9626 | * If the suggest reset bus flags are set, then reset the bus. |
@@ -9644,13 +9643,13 @@ static int advansys_reset(struct scsi_cmnd *scp) | |||
9644 | ret = FAILED; | 9643 | ret = FAILED; |
9645 | break; | 9644 | break; |
9646 | } | 9645 | } |
9647 | spin_lock_irqsave(&boardp->lock, flags); | 9646 | spin_lock_irqsave(shost->host_lock, flags); |
9648 | AdvISR(adv_dvc); | 9647 | AdvISR(adv_dvc); |
9649 | } | 9648 | } |
9650 | 9649 | ||
9651 | /* Save the time of the most recently completed reset. */ | 9650 | /* Save the time of the most recently completed reset. */ |
9652 | boardp->last_reset = jiffies; | 9651 | boardp->last_reset = jiffies; |
9653 | spin_unlock_irqrestore(&boardp->lock, flags); | 9652 | spin_unlock_irqrestore(shost->host_lock, flags); |
9654 | 9653 | ||
9655 | ASC_DBG(1, "ret %d\n", ret); | 9654 | ASC_DBG(1, "ret %d\n", ret); |
9656 | 9655 | ||
@@ -9707,13 +9706,12 @@ advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
9707 | */ | 9706 | */ |
9708 | static irqreturn_t advansys_interrupt(int irq, void *dev_id) | 9707 | static irqreturn_t advansys_interrupt(int irq, void *dev_id) |
9709 | { | 9708 | { |
9710 | unsigned long flags; | ||
9711 | struct Scsi_Host *shost = dev_id; | 9709 | struct Scsi_Host *shost = dev_id; |
9712 | struct asc_board *boardp = shost_priv(shost); | 9710 | struct asc_board *boardp = shost_priv(shost); |
9713 | irqreturn_t result = IRQ_NONE; | 9711 | irqreturn_t result = IRQ_NONE; |
9714 | 9712 | ||
9715 | ASC_DBG(2, "boardp 0x%p\n", boardp); | 9713 | ASC_DBG(2, "boardp 0x%p\n", boardp); |
9716 | spin_lock_irqsave(&boardp->lock, flags); | 9714 | spin_lock(shost->host_lock); |
9717 | if (ASC_NARROW_BOARD(boardp)) { | 9715 | if (ASC_NARROW_BOARD(boardp)) { |
9718 | if (AscIsIntPending(shost->io_port)) { | 9716 | if (AscIsIntPending(shost->io_port)) { |
9719 | result = IRQ_HANDLED; | 9717 | result = IRQ_HANDLED; |
@@ -9728,7 +9726,7 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id) | |||
9728 | ASC_STATS(shost, interrupt); | 9726 | ASC_STATS(shost, interrupt); |
9729 | } | 9727 | } |
9730 | } | 9728 | } |
9731 | spin_unlock_irqrestore(&boardp->lock, flags); | 9729 | spin_unlock(shost->host_lock); |
9732 | 9730 | ||
9733 | ASC_DBG(1, "end\n"); | 9731 | ASC_DBG(1, "end\n"); |
9734 | return result; | 9732 | return result; |
@@ -11203,20 +11201,12 @@ static int | |||
11203 | advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) | 11201 | advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) |
11204 | { | 11202 | { |
11205 | struct Scsi_Host *shost = scp->device->host; | 11203 | struct Scsi_Host *shost = scp->device->host; |
11206 | struct asc_board *boardp = shost_priv(shost); | ||
11207 | unsigned long flags; | ||
11208 | int asc_res, result = 0; | 11204 | int asc_res, result = 0; |
11209 | 11205 | ||
11210 | ASC_STATS(shost, queuecommand); | 11206 | ASC_STATS(shost, queuecommand); |
11211 | scp->scsi_done = done; | 11207 | scp->scsi_done = done; |
11212 | 11208 | ||
11213 | /* | ||
11214 | * host_lock taken by mid-level prior to call, but need | ||
11215 | * to protect against own ISR | ||
11216 | */ | ||
11217 | spin_lock_irqsave(&boardp->lock, flags); | ||
11218 | asc_res = asc_execute_scsi_cmnd(scp); | 11209 | asc_res = asc_execute_scsi_cmnd(scp); |
11219 | spin_unlock_irqrestore(&boardp->lock, flags); | ||
11220 | 11210 | ||
11221 | switch (asc_res) { | 11211 | switch (asc_res) { |
11222 | case ASC_NOERROR: | 11212 | case ASC_NOERROR: |
@@ -13633,7 +13623,6 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost, | |||
13633 | int share_irq, warn_code, ret; | 13623 | int share_irq, warn_code, ret; |
13634 | 13624 | ||
13635 | boardp->id = asc_board_count++; | 13625 | boardp->id = asc_board_count++; |
13636 | spin_lock_init(&boardp->lock); | ||
13637 | pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL; | 13626 | pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL; |
13638 | 13627 | ||
13639 | if (ASC_NARROW_BOARD(boardp)) { | 13628 | if (ASC_NARROW_BOARD(boardp)) { |