From b91bb296188118eea9fdc6093cfcf76bbe8589ba Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 17 Nov 2011 17:59:52 -0800 Subject: [SCSI] libsas: use ->set_dmamode to notify lldds of NCQ parameters sas_discover_sata() notifies lldds of sata devices twice. Once to allow the 'identify' to be sent, and a second time to allow aic94xx (the only libsas driver that cares about sata_dev.identify) to setup NCQ parameters before the device becomes known to the midlayer. Replace this double notification and intervening 'identify' with an explicit ->lldd_ata_set_dmamode notification. With this change all ata internal commands are issued by libata, so we no longer need sas_issue_ata_cmd(). The data from the identify command only needs to be cached in one location so ata_device.id replaces domain_device.sata_dev.identify. Signed-off-by: Dan Williams Signed-off-by: James Bottomley --- drivers/scsi/libsas/sas_discover.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/scsi/libsas/sas_discover.c') diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 7e8fdcb202b..bad5eba4a92 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c @@ -237,11 +237,6 @@ void sas_free_device(struct kref *kref) if (dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV) kfree(dev->ex_dev.ex_phy); - if (dev_is_sata(dev)) { - kfree(dev->sata_dev.identify_device); - kfree(dev->sata_dev.identify_packet_device); - } - kfree(dev); } -- cgit v1.2.3-18-g5258