[SCSI] mptsas : NULL pointer on big endian systems causing Expander not to tear off
authorKashyap, Desai <kashyap.desai@lsi.com>
Wed, 2 Sep 2009 06:14:19 +0000 (11:44 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 12 Sep 2009 14:35:26 +0000 (09:35 -0500)
On Big endian system kernel will crash due to address translation
is not handle properly.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptsas.c

index f744f0fc949124fd06181ece3d8bd287bb8c9cb2..02a18dfcd52a18e06267abfd6d1a43424370d086 100644 (file)
@@ -3314,6 +3314,7 @@ mptsas_send_expander_event(struct fw_event_work *fw_event)
        expander_data = (MpiEventDataSasExpanderStatusChange_t *)
            fw_event->event_data;
        memcpy(&sas_address, &expander_data->SASAddress, sizeof(__le64));
+       sas_address = le64_to_cpu(sas_address);
        port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address);
 
        if (expander_data->ReasonCode == MPI_EVENT_SAS_EXP_RC_ADDED) {