From: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> Date: Wed, 4 Jul 2018 16:54:05 +0530 > > Also I tried replacing readl() API with readw()API (as HBA FW will > send 16 bit data at a time) as shown below and still I see same issue, > > MPI2DefaultReply_t *default_reply = (MPI2DefaultReply_t *)reply; > u16 reply1; > reply1 = readw(&ioc->chip->Doorbell); > reply[1] = reply1; > > printk("LSI debug.. 0x%x, 0x%x, 0x%x \n", reply1, reply[1]); > writel(0, &ioc->chip->HostInterruptStatus); > > printk("LSI MsgLength :%d\n", default_reply->MsgLength); > > And I got below output where message length is wrong, when I execute > above code on SPARC64 machine, It's the ordering of the u8 objects in the structure that is the problem, on big endian they need to be swapped.