Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

Khalid Aziz
2022-06-24T15:38:39Z

On 6/23/22 08:47, Arnd Bergmann wrote:
>
>
> Can you test it again with this patch on top?
>
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index d057abfcdd5c..9e67f2ee25ee 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -2554,8 +2554,14 @@ static void blogic_scan_inbox(struct
> blogic_adapter *adapter)
> enum blogic_cmplt_code comp_code;
>
> while ((comp_code = next_inbox->comp_code) != BLOGIC_INBOX_FREE) {
> - struct blogic_ccb *ccb = blogic_inbox_to_ccb(adapter,
> adapter->next_inbox);
> - if (comp_code != BLOGIC_CMD_NOTFOUND) {
> + struct blogic_ccb *ccb = blogic_inbox_to_ccb(adapter,
> next_inbox);
> + if (!ccb) {
> + /*
> + * This should never happen, unless the CCB list is
> + * corrupted in memory.
> + */
> + blogic_warn("Could not find CCB for dma
> address 0x%x\n", adapter, next_inbox->ccb);
> + } else if (comp_code != BLOGIC_CMD_NOTFOUND) {
> if (ccb->status == BLOGIC_CCB_ACTIVE ||
> ccb->status == BLOGIC_CCB_RESET) {

Hi Arnd,

Driver works with this change. next_inbox is the correct pointer to pass.

Thanks,
Khalid