Bug 59721

Summary: [PATCH]vme_tsi148: VME window master and slave address_attr values don't match what is supported in tsi148_master_set and tsi148_slave_set
Product: Drivers Reporter: Kevin Becker (khbecker)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.10-rc5 Subsystem:
Regression: No Bisected commit-id:
Attachments: vme_tsi148: Valid master and slave address attributes were incorrect. Swap them to match functionality of tsi148_master_set and tsi148_slave_set.

Description Kevin Becker 2013-06-14 18:03:03 UTC
Created attachment 104751 [details]
vme_tsi148: Valid master and slave address attributes were incorrect. Swap them to match functionality of tsi148_master_set and tsi148_slave_set.

In the vme_tsi148 driver, tsi148_master_set supports address modes VME_A16, VME_A24, VME_A32, VME_A64, VME_CRCSR, VME_USER1, VME_USER2, VME_USER3 and VME_USER4. tsi148_slave_set supports address modes VME_A16, VME_A24, VME_A32 and VME_A64. 

However, the address_attr values that check for supported address modes in tsi148_probe show the opposite. Swapping the values of address_attr in the vme_master_resource and vme_slave_resource structs in tsi148_probe fixes this. I have a patch that swaps these values and fixes the issue for me. I have tested this patch by successfully using VME_CRCSR mode in a master window. Before the patch, I got the message "Invalid attributes" in dmesg.