convert aic94xx over to using the sas transport end device
RFC 1/1 convert aic94xx over to using the sas transport end device
The elimination is pretty simple, actually; hopefully that bodes well for the expander conversion.
James
drivers/scsi/aic94xx/aic94xx_dev.c +10 -7
@@ -217,13 +217,16 @@ static int asd_init_target_ddb(struct do } } -if (dev->dev_type ==SAS_END_DEV && dev->end_dev.itnl_timeout >0 ) -asd_ddbsite_write_word (asd_ha, ddb,ITNL_TIMEOUT , -min (dev->end_dev.itnl_timeout, - (u16 )ITNL_TIMEOUT_CONST )); -else -asd_ddbsite_write_word (asd_ha, ddb,ITNL_TIMEOUT , - (u16 )ITNL_TIMEOUT_CONST ); +if (dev->dev_type ==SAS_END_DEV ) { +struct sas_rphy_end_device *rdev =rphy_to_end_device (dev->rphy); +if (rdev->I_T_nexus_loss_timeout >0 ) +asd_ddbsite_write_word (asd_ha, ddb,ITNL_TIMEOUT , +min (rdev->I_T_nexus_loss_timeout, + (u16 )ITNL_TIMEOUT_CONST )); +else +asd_ddbsite_write_word (asd_ha, ddb,ITNL_TIMEOUT , + (u16 )ITNL_TIMEOUT_CONST ); + }return 0 ; }
drivers/scsi/sas/sas_discover.c +13 -76
120 lines not on this page · raw message
drivers/scsi/sas/sas_scsi_host.c +8 -4
@@ -563,12 +563,16 @@ int sas_target_alloc(struct scsi_targetint sas_slave_configure (struct scsi_device *scsi_dev) { -struct domain_device *dev; +struct domain_device *dev =sdev_to_domain_dev (scsi_dev);struct sas_ha_struct *sas_ha; +struct sas_rphy_end_device *rdev =rphy_to_end_device (dev->rphy); + +BUG_ON (dev->rphy->identify.device_type !=SAS_END_DEVICE ); - dev =sdev_to_domain_dev (scsi_dev); sas_ha = dev->port->ha; +sas_read_port_mode_page (scsi_dev); +if (scsi_dev->tagged_supported) {scsi_set_tag_type (scsi_dev,MSG_SIMPLE_TAG );scsi_activate_tcq (scsi_dev,SAS_DEF_QD );
@@ -581,9 +585,9 @@ int sas_slave_configure(struct scsi_deviscsi_deactivate_tcq (scsi_dev,1 ); } -if (dev->end_dev.itnl_timeout >0 ) +if (rdev->I_T_nexus_loss_timeout >0 ) scsi_dev->timeout =HZ + -msecs_to_jiffies (dev->end_dev.itnl_timeout); +msecs_to_jiffies (rdev->I_T_nexus_loss_timeout);return 0 ; }
include/scsi/sas/sas_discover.h +0 -13
@@ -79,18 +79,6 @@ struct sata_device {struct list_head children;/* PM Ports if this is a PM */ }; -/* ---------- SAS end device ---------- */ - -#define SAS_INQUIRY_DATA_LEN 36 - -struct end_device { -u8 ms_10:1 ; -u8 ready_led_meaning:1 ; -u8 rl_wlun:1 ; -u16 itnl_timeout;/* 0 if you do not know it */ -u16 iresp_timeout; -}; -#include <scsi/sas/sas_expander.h> /* ---------- Domain device ---------- */
@@ -122,7 +110,6 @@ struct domain_device {union {struct expander_device ex_dev; -struct end_device end_dev;struct sata_device sata_dev;/* STP & directly attached */ };
include/scsi/sas/sas_expander.h +0 -2
@@ -28,8 +28,6 @@#define ETASK 0xFA -#define to_lu_device (_obj) container_of(_obj, struct LU, lu_obj) -#define to_lu_attr (_attr) container_of(_attr, struct lu_dev_attribute, attr)#define to_dom_device (_obj) container_of(_obj, struct domain_device, dev_obj)#define to_dev_attr (_attr) container_of(_attr, struct domain_dev_attribute,\ attr)