From e3deec090558d5cb5ffdc574e5560f3ed9723394 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Tue, 3 Nov 2009 12:33:07 -0600 Subject: [SCSI] eliminate potential kmalloc failure in scsi_get_vpd_page() The best way to fix this is to eliminate the intenal kmalloc() and make the caller allocate the required amount of storage. Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7c44499..d80b6db 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -348,7 +348,8 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, struct scsi_sense_hdr *); extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries, struct scsi_sense_hdr *sshdr); -extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page); +extern int scsi_get_vpd_page(struct scsi_device *, u8 page, unsigned char *buf, + int buf_len); extern int scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state); extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, -- cgit v1.1 From 0f88009d5cfae890bd3466126d1622ad4f16b798 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Mon, 18 Jan 2010 10:14:51 -0600 Subject: [SCSI] scsi_transport_sas: add support for transport layer retries (TLR) The mpt2sas driver wants to use transport layer retries (TLR) so the simplest thing to do seems to be to add the enabling flags and checks to the SAS transport class, since they're a SAS specific protocol feature. Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 61ad359..ffeebc3 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -107,6 +107,8 @@ struct sas_end_device { struct sas_rphy rphy; /* flags */ unsigned ready_led_meaning:1; + unsigned tlr_supported:1; + unsigned tlr_enabled:1; /* parameters */ u16 I_T_nexus_loss_timeout; u16 initiator_response_timeout; @@ -181,6 +183,11 @@ extern int sas_phy_add(struct sas_phy *); extern void sas_phy_delete(struct sas_phy *); extern int scsi_is_sas_phy(const struct device *); +unsigned int sas_tlr_supported(struct scsi_device *); +unsigned int sas_is_tlr_enabled(struct scsi_device *); +void sas_disable_tlr(struct scsi_device *); +void sas_enable_tlr(struct scsi_device *); + extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); void sas_rphy_free(struct sas_rphy *); -- cgit v1.1 From f7c95ef02b564d9984c0655c9659791b1dd5d7ad Mon Sep 17 00:00:00 2001 From: "Kashyap, Desai" Date: Wed, 16 Dec 2009 18:54:42 +0530 Subject: [SCSI] mpt2sas: Added raid transport support Adding support for raid transport layer. This will provide sysfs attributes containing raid level, state, and resync rate. MPT2SAS module will select RAID_ATTRS. Signed-off-by: Kashyap Desai Reviewed-by: Eric Moore Signed-off-by: James Bottomley --- include/linux/raid_class.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h index 6b537f1..31e1ff6 100644 --- a/include/linux/raid_class.h +++ b/include/linux/raid_class.h @@ -32,6 +32,7 @@ enum raid_level { RAID_LEVEL_0, RAID_LEVEL_1, RAID_LEVEL_10, + RAID_LEVEL_1E, RAID_LEVEL_3, RAID_LEVEL_4, RAID_LEVEL_5, -- cgit v1.1