RE: [PATCH][v1] driver/FSL SATA:Fix wrong Device Error Register usage

2011-02-21 Thread David Laight
The patch changes the code to: if (ap-nr_pmp_links) { + int dev_num; dereg = ioread32(hcr_base + DE); ... + dev_num = ffs(dereg)-1; + if (dev_num ap-nr_pmp_links) { +

[PATCH][v1] driver/FSL SATA:Fix wrong Device Error Register usage

2011-02-20 Thread Prabhakar Kushwaha
When a single device error is detected, the device under the error is indicated by the error bit set in the DER. There is a one to one mapping between register bit and devices on Port multiplier(PMP) i.e. bit 0 represents PMP device 0 and bit 1 represents PMP device 1 etc. Current implementation