Skip to contentSkip to conversation

mptsas : reserving a channel for integrated raid

PATCH In review Eric Moore 2 participants 2 messages Jul 11, 2006

Subsystems (2)
lore
Share & tools
lore

Eric Moore

author
#0 lore raw

PATCH 1/1 mptsas : reserving a channel for integrated raid

Recent changes in the sas transport layer have taken ownership of port_id(channel) assignments. Previously this was owned by the scsi lld, and mptsas code was written to reserve the channel beyond the last port id for integrated raid. With this change in the transport layer, any non-raid devices that land on the reserved channel will not be detected due to improper firmware h:c:t:l mapping calculation.

This patch moves the reserved channel to -1. This can be easily changed to some other value in the future release since its a hash define.

Its higly doubtfull the transport layer would ever use up all the port ids, and wrap back around to zero since this is int.

drivers/message/fusion/mptbase.h +0 -1
diff -uarpN b/drivers/message/fusion/mptbase.h a/drivers/message/fusion/mptbase.h
@@ -634,7 +634,6 @@ typedef struct _MPT_ADAPTER
 	u16			 handle;
 	int			 sas_index; /* index refrencing */
 	MPT_SAS_MGMT		 sas_mgmt;
-	int			 num_ports;
 	struct work_struct	 sas_persist_task;
 
 	struct work_struct	 fc_setup_reset_work;
drivers/message/fusion/mptsas.c +21 -35

119 lines not on this page · raw message

#1 lore raw
Quoted 11 lines · Eric Moore

Recent changes in the sas transport layer have taken ownership of port_id(channel) assignments. Previously this was owned by the scsi lld, and mptsas code was written to reserve the channel beyond the last port id for integrated raid. With this change in the transport layer, any non-raid devices that land on the reserved channel will not be detected due to improper firmware h:c:t:l mapping calculation.

This patch moves the reserved channel to -1. This can be easily changed to some other value in the future release since its a hash define.

I don't think -1 showing up in the channel field is a good idea ... I bet it will confuse parsers of that information.

Quoted 3 lines

Its higly doubtfull the transport layer would ever use up all the port ids, and wrap back around to zero since this is int.

Do we still need this channel number as port number stuff anyway? Originally it was the outgoing phy that was identified in the channel, but even that's no longer true. Since the target ids are assigned per HBA, they're unique enough without requiring additional channel stuff ... how about killing the non zero channel in the sas transport class and then you can simply use 1 for the raid virtual channel?

James