linux/drivers/firmware
Mike Christie bb8fb4e684 ibft: fix target info parsing in ibft module
I got this patch through Red Hat's bugzilla from the bug submitter and
patch creator.  I have just fixed it up so it applies without fuzz to
upstream kernels.

Original patch and description from Shyam kumar Iyer:

The issue [ibft module not displaying targets with short names] is because
of an offset calculatation error in the iscsi_ibft.c code.  Due to this
error directory structure for the target in /sys/firmware/ibft does not
get created and so the initiator is unable to connect to the target.

Note that this bug surfaced only with an name that had a short section at
the end.  eg: "iqn.1984-05.com.dell:dell".  It did not surface when the
iqn's had a longer section at the end.  eg:
"iqn.2001-04.com.example:storage.disk2.sys1.xyz"

So, the eot_offset was calculated such that an extra 48 bytes i.e.  the
size of the ibft_header which has already been accounted was subtracted
twice.

This was not evident with longer iqn names because they would overshoot
the total ibft length more than 48 bytes and thus would escape the bug.

Signed-off-by: Shyam Kumar Iyer <shyam_iyer@dell.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Konrad Rzeszutek <konrad@virtualiron.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 19:21:40 -07:00
..
dcdbas.c cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu 2008-07-26 16:40:33 +02:00
dcdbas.h define global BIT macro 2007-10-19 11:53:42 -07:00
dell_rbu.c dell_rbu: use memory_read_from_buffer() 2008-07-25 10:53:44 -07:00
dmi_scan.c x86 boot: add header comment to dmi.h stating what it is 2008-05-25 10:55:11 +02:00
dmi-id.c Remove inclusions of <linux/autoconf.h> 2008-02-06 10:41:00 -08:00
edd.c edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
efivars.c Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
iscsi_ibft_find.c iscsi_ibft_find: fix modpost warning 2008-07-30 09:41:44 -07:00
iscsi_ibft.c ibft: fix target info parsing in ibft module 2008-09-02 19:21:40 -07:00
Kconfig sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
Makefile sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
memmap.c firmware/memmap: cleanup 2008-08-12 16:07:31 -07:00
pcdp.c serial: convert early_uart to earlycon for 8250 2007-07-16 09:05:35 -07:00
pcdp.h [IA64] Make PCDP work again. 2005-07-13 11:56:32 -07:00