Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aacraid: Fix camel case

Replaced camel case with snake case for init supported options.

Suggested-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Raghava Aditya Renukunta and committed by
Martin K. Petersen
1c68856e 37c85961

+97 -90
+29 -24
drivers/scsi/aacraid/aachba.c
··· 483 483 if (status >= 0) { 484 484 dresp = (struct aac_get_container_count_resp *)fib_data(fibptr); 485 485 maximum_num_containers = le32_to_cpu(dresp->ContainerSwitchEntries); 486 - if (fibptr->dev->supplement_adapter_info.SupportedOptions2 & 486 + if (fibptr->dev->supplement_adapter_info.supported_options2 & 487 487 AAC_OPTION_SUPPORTED_240_VOLUMES) { 488 488 maximum_num_containers = 489 489 le32_to_cpu(dresp->MaxSimpleVolumes); ··· 639 639 fsa_dev_ptr = fibptr->dev->fsa_dev; 640 640 if (fsa_dev_ptr) { 641 641 struct aac_mount * dresp = (struct aac_mount *) fib_data(fibptr); 642 + __le32 sup_options2; 643 + 642 644 fsa_dev_ptr += scmd_id(scsicmd); 645 + sup_options2 = 646 + fibptr->dev->supplement_adapter_info.supported_options2; 643 647 644 648 if ((le32_to_cpu(dresp->status) == ST_OK) && 645 649 (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE) && 646 650 (le32_to_cpu(dresp->mnt[0].state) != FSCS_HIDDEN)) { 647 - if (!(fibptr->dev->supplement_adapter_info.SupportedOptions2 & 648 - AAC_OPTION_VARIABLE_BLOCK_SIZE)) { 651 + if (!(sup_options2 & AAC_OPTION_VARIABLE_BLOCK_SIZE)) { 649 652 dresp->mnt[0].fileinfo.bdevinfo.block_size = 0x200; 650 653 fsa_dev_ptr->block_size = 0x200; 651 654 } else { ··· 691 688 int status; 692 689 693 690 dresp = (struct aac_mount *) fib_data(fibptr); 694 - if (!(fibptr->dev->supplement_adapter_info.SupportedOptions2 & 691 + if (!(fibptr->dev->supplement_adapter_info.supported_options2 & 695 692 AAC_OPTION_VARIABLE_BLOCK_SIZE)) 696 693 dresp->mnt[0].capacityhigh = 0; 697 694 if ((le32_to_cpu(dresp->status) != ST_OK) || ··· 708 705 709 706 dinfo = (struct aac_query_mount *)fib_data(fibptr); 710 707 711 - if (fibptr->dev->supplement_adapter_info.SupportedOptions2 & 708 + if (fibptr->dev->supplement_adapter_info.supported_options2 & 712 709 AAC_OPTION_VARIABLE_BLOCK_SIZE) 713 710 dinfo->command = cpu_to_le32(VM_NameServeAllBlk); 714 711 else ··· 748 745 749 746 dinfo = (struct aac_query_mount *)fib_data(fibptr); 750 747 751 - if (fibptr->dev->supplement_adapter_info.SupportedOptions2 & 748 + if (fibptr->dev->supplement_adapter_info.supported_options2 & 752 749 AAC_OPTION_VARIABLE_BLOCK_SIZE) 753 750 dinfo->command = cpu_to_le32(VM_NameServeAllBlk); 754 751 else ··· 899 896 static void setinqstr(struct aac_dev *dev, void *data, int tindex) 900 897 { 901 898 struct scsi_inq *str; 899 + struct aac_supplement_adapter_info *sup_adap_info; 902 900 901 + sup_adap_info = &dev->supplement_adapter_info; 903 902 str = (struct scsi_inq *)(data); /* cast data to scsi inq block */ 904 903 memset(str, ' ', sizeof(*str)); 905 904 906 - if (dev->supplement_adapter_info.AdapterTypeText[0]) { 907 - char * cp = dev->supplement_adapter_info.AdapterTypeText; 905 + if (sup_adap_info->adapter_type_text[0]) { 906 + char *cp = sup_adap_info->adapter_type_text; 908 907 int c; 909 908 if ((cp[0] == 'A') && (cp[1] == 'O') && (cp[2] == 'C')) 910 909 inqstrcpy("SMC", str->vid); ··· 916 911 ++cp; 917 912 c = *cp; 918 913 *cp = '\0'; 919 - inqstrcpy (dev->supplement_adapter_info.AdapterTypeText, 920 - str->vid); 914 + inqstrcpy(sup_adap_info->adapter_type_text, str->vid); 921 915 *cp = c; 922 916 while (*cp && *cp != ' ') 923 917 ++cp; ··· 1679 1675 if (!identify_resp) 1680 1676 goto fib_free_ptr; 1681 1677 1682 - vbus = (u32)le16_to_cpu(dev->supplement_adapter_info.VirtDeviceBus); 1683 - vid = (u32)le16_to_cpu(dev->supplement_adapter_info.VirtDeviceTarget); 1678 + vbus = (u32)le16_to_cpu(dev->supplement_adapter_info.virt_device_bus); 1679 + vid = (u32)le16_to_cpu(dev->supplement_adapter_info.virt_device_target); 1684 1680 1685 1681 aac_fib_init(fibptr); 1686 1682 ··· 1819 1815 } 1820 1816 1821 1817 vbus = (u32) le16_to_cpu( 1822 - dev->supplement_adapter_info.VirtDeviceBus); 1818 + dev->supplement_adapter_info.virt_device_bus); 1823 1819 vid = (u32) le16_to_cpu( 1824 - dev->supplement_adapter_info.VirtDeviceTarget); 1820 + dev->supplement_adapter_info.virt_device_target); 1825 1821 1826 1822 aac_fib_init(fibptr); 1827 1823 ··· 1897 1893 } 1898 1894 memcpy(&dev->adapter_info, info, sizeof(*info)); 1899 1895 1900 - dev->supplement_adapter_info.VirtDeviceBus = 0xffff; 1896 + dev->supplement_adapter_info.virt_device_bus = 0xffff; 1901 1897 if (dev->adapter_info.options & AAC_OPT_SUPPLEMENT_ADAPTER_INFO) { 1902 1898 struct aac_supplement_adapter_info * sinfo; 1903 1899 ··· 1965 1961 } 1966 1962 1967 1963 if (!dev->sync_mode && dev->sa_firmware && 1968 - dev->supplement_adapter_info.VirtDeviceBus != 0xffff) { 1964 + dev->supplement_adapter_info.virt_device_bus != 0xffff) { 1969 1965 /* Thor SA Firmware -> CISS_REPORT_PHYSICAL_LUNS */ 1970 1966 rcode = aac_report_phys_luns(dev, fibptr, AAC_INIT); 1971 1967 } ··· 1980 1976 (tmp>>16)&0xff, 1981 1977 tmp&0xff, 1982 1978 le32_to_cpu(dev->adapter_info.kernelbuild), 1983 - (int)sizeof(dev->supplement_adapter_info.BuildDate), 1984 - dev->supplement_adapter_info.BuildDate); 1979 + (int)sizeof(dev->supplement_adapter_info.build_date), 1980 + dev->supplement_adapter_info.build_date); 1985 1981 tmp = le32_to_cpu(dev->adapter_info.monitorrev); 1986 1982 printk(KERN_INFO "%s%d: monitor %d.%d-%d[%d]\n", 1987 1983 dev->name, dev->id, ··· 1997 1993 shost_to_class(dev->scsi_host_ptr), buffer)) 1998 1994 printk(KERN_INFO "%s%d: serial %s", 1999 1995 dev->name, dev->id, buffer); 2000 - if (dev->supplement_adapter_info.VpdInfo.Tsid[0]) { 1996 + if (dev->supplement_adapter_info.vpd_info.tsid[0]) { 2001 1997 printk(KERN_INFO "%s%d: TSID %.*s\n", 2002 1998 dev->name, dev->id, 2003 - (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid), 2004 - dev->supplement_adapter_info.VpdInfo.Tsid); 1999 + (int)sizeof(dev->supplement_adapter_info 2000 + .vpd_info.tsid), 2001 + dev->supplement_adapter_info.vpd_info.tsid); 2005 2002 } 2006 2003 if (!aac_check_reset || ((aac_check_reset == 1) && 2007 - (dev->supplement_adapter_info.SupportedOptions2 & 2004 + (dev->supplement_adapter_info.supported_options2 & 2008 2005 AAC_OPTION_IGNORE_RESET))) { 2009 2006 printk(KERN_INFO "%s%d: Reset Adapter Ignored\n", 2010 2007 dev->name, dev->id); ··· 2013 2008 } 2014 2009 2015 2010 dev->cache_protected = 0; 2016 - dev->jbod = ((dev->supplement_adapter_info.FeatureBits & 2011 + dev->jbod = ((dev->supplement_adapter_info.feature_bits & 2017 2012 AAC_FEATURE_JBOD) != 0); 2018 2013 dev->nondasd_support = 0; 2019 2014 dev->raid_scsi_mode = 0; ··· 2636 2631 struct scsi_device *sdev = scsicmd->device; 2637 2632 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; 2638 2633 2639 - if (!(aac->supplement_adapter_info.SupportedOptions2 & 2634 + if (!(aac->supplement_adapter_info.supported_options2 & 2640 2635 AAC_OPTION_POWER_MANAGEMENT)) { 2641 2636 scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | 2642 2637 SAM_STAT_GOOD;
+46 -46
drivers/scsi/aacraid/aacraid.h
··· 1380 1380 1381 1381 struct aac_supplement_adapter_info 1382 1382 { 1383 - u8 AdapterTypeText[17+1]; 1384 - u8 Pad[2]; 1385 - __le32 FlashMemoryByteSize; 1386 - __le32 FlashImageId; 1387 - __le32 MaxNumberPorts; 1388 - __le32 Version; 1389 - __le32 FeatureBits; 1390 - u8 SlotNumber; 1391 - u8 ReservedPad0[3]; 1392 - u8 BuildDate[12]; 1393 - __le32 CurrentNumberPorts; 1383 + u8 adapter_type_text[17+1]; 1384 + u8 pad[2]; 1385 + __le32 flash_memory_byte_size; 1386 + __le32 flash_image_id; 1387 + __le32 max_number_ports; 1388 + __le32 version; 1389 + __le32 feature_bits; 1390 + u8 slot_number; 1391 + u8 reserved_pad0[3]; 1392 + u8 build_date[12]; 1393 + __le32 current_number_ports; 1394 1394 struct { 1395 - u8 AssemblyPn[8]; 1396 - u8 FruPn[8]; 1397 - u8 BatteryFruPn[8]; 1398 - u8 EcVersionString[8]; 1399 - u8 Tsid[12]; 1400 - } VpdInfo; 1401 - __le32 FlashFirmwareRevision; 1402 - __le32 FlashFirmwareBuild; 1403 - __le32 RaidTypeMorphOptions; 1404 - __le32 FlashFirmwareBootRevision; 1405 - __le32 FlashFirmwareBootBuild; 1406 - u8 MfgPcbaSerialNo[12]; 1407 - u8 MfgWWNName[8]; 1408 - __le32 SupportedOptions2; 1409 - __le32 StructExpansion; 1395 + u8 assembly_pn[8]; 1396 + u8 fru_pn[8]; 1397 + u8 battery_fru_pn[8]; 1398 + u8 ec_version_string[8]; 1399 + u8 tsid[12]; 1400 + } vpd_info; 1401 + __le32 flash_firmware_revision; 1402 + __le32 flash_firmware_build; 1403 + __le32 raid_type_morph_options; 1404 + __le32 flash_firmware_boot_revision; 1405 + __le32 flash_firmware_boot_build; 1406 + u8 mfg_pcba_serial_no[12]; 1407 + u8 mfg_wwn_name[8]; 1408 + __le32 supported_options2; 1409 + __le32 struct_expansion; 1410 1410 /* StructExpansion == 1 */ 1411 - __le32 FeatureBits3; 1412 - __le32 SupportedPerformanceModes; 1413 - u8 HostBusType; /* uses HOST_BUS_TYPE_xxx defines */ 1414 - u8 HostBusWidth; /* actual width in bits or links */ 1415 - u16 HostBusSpeed; /* actual bus speed/link rate in MHz */ 1416 - u8 MaxRRCDrives; /* max. number of ITP-RRC drives/pool */ 1417 - u8 MaxDiskXtasks; /* max. possible num of DiskX Tasks */ 1411 + __le32 feature_bits3; 1412 + __le32 supported_performance_modes; 1413 + u8 host_bus_type; /* uses HOST_BUS_TYPE_xxx defines */ 1414 + u8 host_bus_width; /* actual width in bits or links */ 1415 + u16 host_bus_speed; /* actual bus speed/link rate in MHz */ 1416 + u8 max_rrc_drives; /* max. number of ITP-RRC drives/pool */ 1417 + u8 max_disk_xtasks; /* max. possible num of DiskX Tasks */ 1418 1418 1419 - u8 CpldVerLoaded; 1420 - u8 CpldVerInFlash; 1419 + u8 cpld_ver_loaded; 1420 + u8 cpld_ver_in_flash; 1421 1421 1422 - __le64 MaxRRCCapacity; 1423 - __le32 CompiledMaxHistLogLevel; 1424 - u8 CustomBoardName[12]; 1425 - u16 SupportedCntlrMode; /* identify supported controller mode */ 1426 - u16 ReservedForFuture16; 1427 - __le32 SupportedOptions3; /* reserved for future options */ 1422 + __le64 max_rrc_capacity; 1423 + __le32 compiled_max_hist_log_level; 1424 + u8 custom_board_name[12]; 1425 + u16 supported_cntlr_mode; /* identify supported controller mode */ 1426 + u16 reserved_for_future16; 1427 + __le32 supported_options3; /* reserved for future options */ 1428 1428 1429 - __le16 VirtDeviceBus; /* virt. SCSI device for Thor */ 1430 - __le16 VirtDeviceTarget; 1431 - __le16 VirtDeviceLUN; 1432 - __le16 Unused; 1433 - __le32 ReservedForFutureGrowth[68]; 1429 + __le16 virt_device_bus; /* virt. SCSI device for Thor */ 1430 + __le16 virt_device_target; 1431 + __le16 virt_device_lun; 1432 + __le16 unused; 1433 + __le32 reserved_for_future_growth[68]; 1434 1434 1435 1435 }; 1436 1436 #define AAC_FEATURE_FALCON cpu_to_le32(0x00000010)
+3 -3
drivers/scsi/aacraid/commsup.c
··· 1815 1815 printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); 1816 1816 1817 1817 if (!aac_check_reset || ((aac_check_reset == 1) && 1818 - (aac->supplement_adapter_info.SupportedOptions2 & 1818 + (aac->supplement_adapter_info.supported_options2 & 1819 1819 AAC_OPTION_IGNORE_RESET))) 1820 1820 goto out; 1821 1821 host = aac->scsi_host_ptr; ··· 2264 2264 2265 2265 aac_fib_init(fibptr); 2266 2266 2267 - vbus = (u32)le16_to_cpu(dev->supplement_adapter_info.VirtDeviceBus); 2268 - vid = (u32)le16_to_cpu(dev->supplement_adapter_info.VirtDeviceTarget); 2267 + vbus = (u32)le16_to_cpu(dev->supplement_adapter_info.virt_device_bus); 2268 + vid = (u32)le16_to_cpu(dev->supplement_adapter_info.virt_device_target); 2269 2269 2270 2270 srbcmd = (struct aac_srb *)fib_data(fibptr); 2271 2271
+17 -15
drivers/scsi/aacraid/linit.c
··· 891 891 * Adapters that support a register, instead of a commanded, 892 892 * reset. 893 893 */ 894 - if (((aac->supplement_adapter_info.SupportedOptions2 & 894 + if (((aac->supplement_adapter_info.supported_options2 & 895 895 AAC_OPTION_MU_RESET) || 896 - (aac->supplement_adapter_info.SupportedOptions2 & 896 + (aac->supplement_adapter_info.supported_options2 & 897 897 AAC_OPTION_DOORBELL_RESET)) && 898 898 aac_check_reset && 899 899 ((aac_check_reset != 1) || 900 - !(aac->supplement_adapter_info.SupportedOptions2 & 900 + !(aac->supplement_adapter_info.supported_options2 & 901 901 AAC_OPTION_IGNORE_RESET))) { 902 902 /* Bypass wait for command quiesce */ 903 903 aac_reset_adapter(aac, 2, IOP_HWSOFT_RESET); ··· 1029 1029 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; 1030 1030 int len; 1031 1031 1032 - if (dev->supplement_adapter_info.AdapterTypeText[0]) { 1033 - char * cp = dev->supplement_adapter_info.AdapterTypeText; 1032 + if (dev->supplement_adapter_info.adapter_type_text[0]) { 1033 + char *cp = dev->supplement_adapter_info.adapter_type_text; 1034 1034 while (*cp && *cp != ' ') 1035 1035 ++cp; 1036 1036 while (*cp == ' ') ··· 1046 1046 struct device_attribute *attr, char *buf) 1047 1047 { 1048 1048 struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; 1049 + struct aac_supplement_adapter_info *sup_adap_info; 1049 1050 int len; 1050 1051 1051 - if (dev->supplement_adapter_info.AdapterTypeText[0]) { 1052 - char * cp = dev->supplement_adapter_info.AdapterTypeText; 1052 + sup_adap_info = &dev->supplement_adapter_info; 1053 + if (sup_adap_info->adapter_type_text[0]) { 1054 + char *cp = sup_adap_info->adapter_type_text; 1053 1055 while (*cp && *cp != ' ') 1054 1056 ++cp; 1055 1057 len = snprintf(buf, PAGE_SIZE, "%.*s\n", 1056 - (int)(cp - (char *)dev->supplement_adapter_info.AdapterTypeText), 1057 - dev->supplement_adapter_info.AdapterTypeText); 1058 + (int)(cp - (char *)sup_adap_info->adapter_type_text), 1059 + sup_adap_info->adapter_type_text); 1058 1060 } else 1059 1061 len = snprintf(buf, PAGE_SIZE, "%s\n", 1060 - aac_drivers[dev->cardtype].vname); 1062 + aac_drivers[dev->cardtype].vname); 1061 1063 return len; 1062 1064 } 1063 1065 ··· 1080 1078 "SAI_READ_CAPACITY_16\n"); 1081 1079 if (dev->jbod) 1082 1080 len += snprintf(buf + len, PAGE_SIZE - len, "SUPPORTED_JBOD\n"); 1083 - if (dev->supplement_adapter_info.SupportedOptions2 & 1081 + if (dev->supplement_adapter_info.supported_options2 & 1084 1082 AAC_OPTION_POWER_MANAGEMENT) 1085 1083 len += snprintf(buf + len, PAGE_SIZE - len, 1086 1084 "SUPPORTED_POWER_MANAGEMENT\n"); ··· 1141 1139 len = snprintf(buf, 16, "%06X\n", 1142 1140 le32_to_cpu(dev->adapter_info.serial[0])); 1143 1141 if (len && 1144 - !memcmp(&dev->supplement_adapter_info.MfgPcbaSerialNo[ 1145 - sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo)-len], 1142 + !memcmp(&dev->supplement_adapter_info.mfg_pcba_serial_no[ 1143 + sizeof(dev->supplement_adapter_info.mfg_pcba_serial_no)-len], 1146 1144 buf, len-1)) 1147 1145 len = snprintf(buf, 16, "%.*s\n", 1148 - (int)sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo), 1149 - dev->supplement_adapter_info.MfgPcbaSerialNo); 1146 + (int)sizeof(dev->supplement_adapter_info.mfg_pcba_serial_no), 1147 + dev->supplement_adapter_info.mfg_pcba_serial_no); 1150 1148 1151 1149 return min(len, 16); 1152 1150 }
+1 -1
drivers/scsi/aacraid/rx.c
··· 475 475 { 476 476 u32 var = 0; 477 477 478 - if (!(dev->supplement_adapter_info.SupportedOptions2 & 478 + if (!(dev->supplement_adapter_info.supported_options2 & 479 479 AAC_OPTION_MU_RESET) || (bled >= 0) || (bled == -2)) { 480 480 if (bled) 481 481 printk(KERN_ERR "%s%d: adapter kernel panic'd %x.\n",
+1 -1
drivers/scsi/aacraid/src.c
··· 684 684 685 685 aac_set_intx_mode(dev); 686 686 687 - if (!bled && (dev->supplement_adapter_info.SupportedOptions2 & 687 + if (!bled && (dev->supplement_adapter_info.supported_options2 & 688 688 AAC_OPTION_DOORBELL_RESET)) { 689 689 src_writel(dev, MUnit.IDR, reset_mask); 690 690 } else {