Uh - there isn't a mandate that the internals of the fc transport have values
that are the same as hbaapi/etc... although, it usually is the proper thing to
do. Where standards have been bad/screwy (especially true of hbaapi), the
more natural or better implementation within the kernel should win out - with
libraries like hbaapi translating from kernel implementation to standard
presentation. As you point out - the sysfs attribute routine insulates the
user-side from internal values - so there's no actual need to have it track
the same values as hbaapi. I actually like that 4G shows up as value 4 -
and we could even obsolete the string lookup in the sysfs routine if desired.
In fact, I would recommend the transport kill the 10G value (it doesn't exist
in product anywhere) and go with 4 for 4G, 8 for 8G, 16 for 16G (unless -
we're also trying to bring in fcoe link speeds - which I don't think we
should). If it's not used to report capabilities (multiple values) - we could
even convert the field to just the integer speed value explicitly.
Was the sysfs attribute the only user-side compatibility issue seen ?
For proper subsystem review - this patch must be submitted to
linux-s...@vger.kernel.org
-- james s
PS: I was wondering why I originally had these values - and I believed I
followed the argument above - to have 4G be 4.
On 1/3/2012 1:35 PM, Neerav Parikh wrote:
The values for the 4G and 10G speeds are not in sync with
definitions in SM-HBA/FC-GS-x/etc.
This patch brings them in sync to these specifications.
The values are converted to strings when represented via
sysfs attribute, hence that should cover for user space
apps as they may not see any change.
Signed-off-by: Neerav Parikh<neerav.par...@intel.com>
Tested-by: Ross Brattain<ross.b.bratt...@intel.com>
---
include/scsi/scsi_transport_fc.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 0135cbc..719faf1 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -126,8 +126,8 @@ enum fc_vport_state {
incapable of reporting */
#define FC_PORTSPEED_1GBIT 1
#define FC_PORTSPEED_2GBIT 2
-#define FC_PORTSPEED_4GBIT 4
-#define FC_PORTSPEED_10GBIT 8
+#define FC_PORTSPEED_10GBIT 4
+#define FC_PORTSPEED_4GBIT 8
#define FC_PORTSPEED_8GBIT 0x10
#define FC_PORTSPEED_16GBIT 0x20
#define FC_PORTSPEED_NOT_NEGOTIATED (1<< 15) /* Speed not established */
_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel