]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/s390-15-07-zfcp-fc-rport.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-15-07-zfcp-fc-rport.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zfcp: Don't create multiple sysfs entries for same WWPN
3 References: bnc#518291,LTC#54468
4
5 Symptom: The FC transport class creates multiple rport entries in
6 sysfs for the same WWPN.
7 Problem: The FC transport class requires that the
8 fc_remote_port_add and fc_remote_delete functions are
9 always called in this sequence. It was possible that zfcp
10 called fc_remote_port_add twice leading to the problem.
11 Solution: Make sure to only call fc_remote_port_add once before
12 calling fc_remote_port_delete.
13
14 Acked-by: John Jolly <jjolly@suse.de>
15 ---
16 drivers/s390/scsi/zfcp_scsi.c | 7 ++++++-
17 1 file changed, 6 insertions(+), 1 deletion(-)
18
19 --- a/drivers/s390/scsi/zfcp_scsi.c 2009-06-29 14:11:50.000000000 +0200
20 +++ b/drivers/s390/scsi/zfcp_scsi.c 2009-06-29 14:27:25.000000000 +0200
21 @@ -525,6 +525,9 @@ static void zfcp_scsi_rport_register(str
22 struct fc_rport_identifiers ids;
23 struct fc_rport *rport;
24
25 + if (port->rport)
26 + return;
27 +
28 ids.node_name = port->wwnn;
29 ids.port_name = port->wwpn;
30 ids.port_id = port->d_id;
31 @@ -548,8 +551,10 @@ static void zfcp_scsi_rport_block(struct
32 {
33 struct fc_rport *rport = port->rport;
34
35 - if (rport)
36 + if (rport) {
37 fc_remote_port_delete(rport);
38 + port->rport = NULL;
39 + }
40 }
41
42 void zfcp_scsi_schedule_rport_register(struct zfcp_port *port)