Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixe…
Browse files Browse the repository at this point in the history
…s-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] hpsa: Disable ASPM
  [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy
  [SCSI] mpt2sas: add missing allocation.
  [SCSI] Silencing 'killing requests for dead queue'
  [SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704
  • Loading branch information
torvalds committed Nov 17, 2011
2 parents fec6489 + e5a44df commit a9098b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
4 changes: 4 additions & 0 deletions drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
Expand Down Expand Up @@ -1109,6 +1110,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
unique_id++;
}

pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
PCIE_LINK_STATE_CLKPM);

error = pci_enable_device(pdev);
if (error)
goto out;
Expand Down
5 changes: 5 additions & 0 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/delay.h>
Expand Down Expand Up @@ -3922,6 +3923,10 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h)
dev_warn(&h->pdev->dev, "controller appears to be disabled\n");
return -ENODEV;
}

pci_disable_link_state(h->pdev, PCIE_LINK_STATE_L0S |
PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);

err = pci_enable_device(h->pdev);
if (err) {
dev_warn(&h->pdev->dev, "unable to enable PCI device\n");
Expand Down
5 changes: 5 additions & 0 deletions drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,11 @@ _scsih_error_recovery_delete_devices(struct MPT2SAS_ADAPTER *ioc)

if (ioc->is_driver_loading)
return;

fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC);
if (!fw_event)
return;

fw_event->event = MPT2SAS_REMOVE_UNRESPONDING_DEVICES;
fw_event->ioc = ioc;
_scsih_fw_event_add(ioc, fw_event);
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)

blk_start_request(req);

scmd_printk(KERN_INFO, cmd, "killing request\n");

sdev = cmd->device;
starget = scsi_target(sdev);
shost = sdev->host;
Expand Down Expand Up @@ -1490,7 +1492,6 @@ static void scsi_request_fn(struct request_queue *q)
struct request *req;

if (!sdev) {
printk("scsi: killing requests for dead queue\n");
while ((req = blk_peek_request(q)) != NULL)
scsi_kill_request(req, q);
return;
Expand Down
6 changes: 1 addition & 5 deletions drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
return sdev;

out_device_destroy:
scsi_device_set_state(sdev, SDEV_DEL);
transport_destroy_device(&sdev->sdev_gendev);
put_device(&sdev->sdev_dev);
scsi_free_queue(sdev->request_queue);
put_device(&sdev->sdev_gendev);
__scsi_remove_device(sdev);
out:
if (display_failure_msg)
printk(ALLOC_FAILURE_MSG, __func__);
Expand Down

0 comments on commit a9098b3

Please sign in to comment.