]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commitdiff
megasas: Fix outw, outl argument order
authorStefan Weil <sw@weilnetz.de>
Sat, 29 Aug 2015 06:02:38 +0000 (08:02 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 3 Sep 2015 13:55:39 +0000 (09:55 -0400)
The value is the first argument and the port is the second,
but the code was using the opposite order.

Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/hw/megasas.c

index 5a07ab37aae3f5ca688126e7b943f176d3e491ca..c0099514a99a7f4aa8a2ebc6e9c2a45474c76584 100644 (file)
@@ -301,9 +301,9 @@ static int megasas_transition_to_ready(struct pci_device *pci, u32 ioaddr)
                 pci->device == PCI_DEVICE_ID_LSI_SAS2008 ||
                 pci->device == PCI_DEVICE_ID_LSI_SAS2208 ||
                 pci->device == PCI_DEVICE_ID_LSI_SAS3108) {
-                outl(ioaddr + MFI_DB, mfi_flags);
+                outl(mfi_flags, ioaddr + MFI_DB);
             } else {
-                outl(ioaddr + MFI_IDB, mfi_flags);
+                outl(mfi_flags, ioaddr + MFI_IDB);
             }
             break;
         case MFI_STATE_OPERATIONAL:
@@ -312,7 +312,7 @@ static int megasas_transition_to_ready(struct pci_device *pci, u32 ioaddr)
                 pci->device == PCI_DEVICE_ID_LSI_SAS2008 ||
                 pci->device == PCI_DEVICE_ID_LSI_SAS2208 ||
                 pci->device == PCI_DEVICE_ID_LSI_SAS3108) {
-                outl(ioaddr + MFI_DB, mfi_flags);
+                outl(mfi_flags, ioaddr + MFI_DB);
                 if (pci->device == PCI_DEVICE_ID_LSI_SAS2208 ||
                     pci->device == PCI_DEVICE_ID_LSI_SAS3108) {
                     int j = 0;
@@ -327,7 +327,7 @@ static int megasas_transition_to_ready(struct pci_device *pci, u32 ioaddr)
                     }
                 }
             } else {
-                outw(ioaddr + MFI_IDB, mfi_flags);
+                outw(mfi_flags, ioaddr + MFI_IDB);
             }
             break;
         case MFI_STATE_READY: