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

[SCSI] gdth: Convert to use regular kernel types.

converted using this script..

perl -p -i -e 's|ulong32|u32|g' drivers/scsi/gdth*
perl -p -i -e 's|ulong64|u64|g' drivers/scsi/gdth*
perl -p -i -e 's|ushort|u16|g' drivers/scsi/gdth*
perl -p -i -e 's|unchar|u8|g' drivers/scsi/gdth*
perl -p -i -e 's|ulong|unsigned long|g' drivers/scsi/gdth*
perl -p -i -e 's|PACKED|__attribute__((packed))|g' drivers/scsi/gdth*

sha1sum of the generated code was identical before and after.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Dave Jones and committed by
James Bottomley
1fe6dbf4 e7efe593

+889 -897
+215 -215
drivers/scsi/gdth.c
··· 140 140 #include "gdth.h" 141 141 142 142 static void gdth_delay(int milliseconds); 143 - static void gdth_eval_mapping(ulong32 size, ulong32 *cyls, int *heads, int *secs); 143 + static void gdth_eval_mapping(u32 size, u32 *cyls, int *heads, int *secs); 144 144 static irqreturn_t gdth_interrupt(int irq, void *dev_id); 145 145 static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, 146 146 int gdth_from_wait, int* pIndex); 147 - static int gdth_sync_event(gdth_ha_str *ha, int service, unchar index, 147 + static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, 148 148 Scsi_Cmnd *scp); 149 149 static int gdth_async_event(gdth_ha_str *ha); 150 150 static void gdth_log_event(gdth_evt_data *dvr, char *buffer); 151 151 152 - static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority); 152 + static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 priority); 153 153 static void gdth_next(gdth_ha_str *ha); 154 - static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar b); 154 + static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 b); 155 155 static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp); 156 - static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, ushort source, 157 - ushort idx, gdth_evt_data *evt); 156 + static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, u16 source, 157 + u16 idx, gdth_evt_data *evt); 158 158 static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr); 159 - static void gdth_readapp_event(gdth_ha_str *ha, unchar application, 159 + static void gdth_readapp_event(gdth_ha_str *ha, u8 application, 160 160 gdth_evt_str *estr); 161 161 static void gdth_clear_events(void); 162 162 163 163 static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, 164 - char *buffer, ushort count); 164 + char *buffer, u16 count); 165 165 static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp); 166 - static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive); 166 + static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u16 hdrive); 167 167 168 168 static void gdth_enable_int(gdth_ha_str *ha); 169 169 static int gdth_test_busy(gdth_ha_str *ha); 170 170 static int gdth_get_cmd_index(gdth_ha_str *ha); 171 171 static void gdth_release_event(gdth_ha_str *ha); 172 - static int gdth_wait(gdth_ha_str *ha, int index,ulong32 time); 173 - static int gdth_internal_cmd(gdth_ha_str *ha, unchar service, ushort opcode, 174 - ulong32 p1, ulong64 p2,ulong64 p3); 172 + static int gdth_wait(gdth_ha_str *ha, int index,u32 time); 173 + static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode, 174 + u32 p1, u64 p2,u64 p3); 175 175 static int gdth_search_drives(gdth_ha_str *ha); 176 - static int gdth_analyse_hdrive(gdth_ha_str *ha, ushort hdrive); 176 + static int gdth_analyse_hdrive(gdth_ha_str *ha, u16 hdrive); 177 177 178 178 static const char *gdth_ctr_name(gdth_ha_str *ha); 179 179 ··· 189 189 static void gdth_scsi_done(struct scsi_cmnd *scp); 190 190 191 191 #ifdef DEBUG_GDTH 192 - static unchar DebugState = DEBUG_GDTH; 192 + static u8 DebugState = DEBUG_GDTH; 193 193 194 194 #ifdef __SERIAL__ 195 195 #define MAX_SERBUF 160 ··· 270 270 #endif 271 271 272 272 #ifdef GDTH_STATISTICS 273 - static ulong32 max_rq=0, max_index=0, max_sg=0; 273 + static u32 max_rq=0, max_index=0, max_sg=0; 274 274 #ifdef INT_COAL 275 - static ulong32 max_int_coal=0; 275 + static u32 max_int_coal=0; 276 276 #endif 277 - static ulong32 act_ints=0, act_ios=0, act_stats=0, act_rq=0; 277 + static u32 act_ints=0, act_ios=0, act_stats=0, act_rq=0; 278 278 static struct timer_list gdth_timer; 279 279 #endif 280 280 281 - #define PTR2USHORT(a) (ushort)(ulong)(a) 281 + #define PTR2USHORT(a) (u16)(unsigned long)(a) 282 282 #define GDTOFFSOF(a,b) (size_t)&(((a*)0)->b) 283 283 #define INDEX_OK(i,t) ((i)<ARRAY_SIZE(t)) 284 284 285 285 #define BUS_L2P(a,b) ((b)>(a)->virt_bus ? (b-1):(b)) 286 286 287 287 #ifdef CONFIG_ISA 288 - static unchar gdth_drq_tab[4] = {5,6,7,7}; /* DRQ table */ 288 + static u8 gdth_drq_tab[4] = {5,6,7,7}; /* DRQ table */ 289 289 #endif 290 290 #if defined(CONFIG_EISA) || defined(CONFIG_ISA) 291 - static unchar gdth_irq_tab[6] = {0,10,11,12,14,0}; /* IRQ table */ 291 + static u8 gdth_irq_tab[6] = {0,10,11,12,14,0}; /* IRQ table */ 292 292 #endif 293 - static unchar gdth_polling; /* polling if TRUE */ 293 + static u8 gdth_polling; /* polling if TRUE */ 294 294 static int gdth_ctr_count = 0; /* controller count */ 295 295 static LIST_HEAD(gdth_instances); /* controller list */ 296 - static unchar gdth_write_through = FALSE; /* write through */ 296 + static u8 gdth_write_through = FALSE; /* write through */ 297 297 static gdth_evt_str ebuffer[MAX_EVENTS]; /* event buffer */ 298 298 static int elastidx; 299 299 static int eoldidx; ··· 303 303 #define DOU 2 /* OUT data direction */ 304 304 #define DNO DIN /* no data transfer */ 305 305 #define DUN DIN /* unknown data direction */ 306 - static unchar gdth_direction_tab[0x100] = { 306 + static u8 gdth_direction_tab[0x100] = { 307 307 DNO,DNO,DIN,DIN,DOU,DIN,DIN,DOU,DIN,DUN,DOU,DOU,DUN,DUN,DUN,DIN, 308 308 DNO,DIN,DIN,DOU,DIN,DOU,DNO,DNO,DOU,DNO,DIN,DNO,DIN,DOU,DNO,DUN, 309 309 DIN,DUN,DIN,DUN,DOU,DIN,DUN,DUN,DIN,DIN,DOU,DNO,DUN,DIN,DOU,DOU, ··· 390 390 static struct gdth_cmndinfo *gdth_get_cmndinfo(gdth_ha_str *ha) 391 391 { 392 392 struct gdth_cmndinfo *priv = NULL; 393 - ulong flags; 393 + unsigned long flags; 394 394 int i; 395 395 396 396 spin_lock_irqsave(&ha->smp_lock, flags); ··· 493 493 return rval; 494 494 } 495 495 496 - static void gdth_eval_mapping(ulong32 size, ulong32 *cyls, int *heads, int *secs) 496 + static void gdth_eval_mapping(u32 size, u32 *cyls, int *heads, int *secs) 497 497 { 498 498 *cyls = size /HEADS/SECS; 499 499 if (*cyls <= MAXCYLS) { ··· 514 514 515 515 /* controller search and initialization functions */ 516 516 #ifdef CONFIG_EISA 517 - static int __init gdth_search_eisa(ushort eisa_adr) 517 + static int __init gdth_search_eisa(u16 eisa_adr) 518 518 { 519 - ulong32 id; 519 + u32 id; 520 520 521 521 TRACE(("gdth_search_eisa() adr. %x\n",eisa_adr)); 522 522 id = inl(eisa_adr+ID0REG); ··· 533 533 #endif /* CONFIG_EISA */ 534 534 535 535 #ifdef CONFIG_ISA 536 - static int __init gdth_search_isa(ulong32 bios_adr) 536 + static int __init gdth_search_isa(u32 bios_adr) 537 537 { 538 538 void __iomem *addr; 539 - ulong32 id; 539 + u32 id; 540 540 541 541 TRACE(("gdth_search_isa() bios adr. %x\n",bios_adr)); 542 - if ((addr = ioremap(bios_adr+BIOS_ID_OFFS, sizeof(ulong32))) != NULL) { 542 + if ((addr = ioremap(bios_adr+BIOS_ID_OFFS, sizeof(u32))) != NULL) { 543 543 id = readl(addr); 544 544 iounmap(addr); 545 545 if (id == GDT2_ID) /* GDT2000 */ ··· 551 551 552 552 #ifdef CONFIG_PCI 553 553 554 - static bool gdth_search_vortex(ushort device) 554 + static bool gdth_search_vortex(u16 device) 555 555 { 556 556 if (device <= PCI_DEVICE_ID_VORTEX_GDT6555) 557 557 return true; ··· 603 603 static int __devinit gdth_pci_init_one(struct pci_dev *pdev, 604 604 const struct pci_device_id *ent) 605 605 { 606 - ushort vendor = pdev->vendor; 607 - ushort device = pdev->device; 608 - ulong base0, base1, base2; 606 + u16 vendor = pdev->vendor; 607 + u16 device = pdev->device; 608 + unsigned long base0, base1, base2; 609 609 int rc; 610 610 gdth_pci_str gdth_pcistr; 611 611 gdth_ha_str *ha = NULL; ··· 658 658 #endif /* CONFIG_PCI */ 659 659 660 660 #ifdef CONFIG_EISA 661 - static int __init gdth_init_eisa(ushort eisa_adr,gdth_ha_str *ha) 661 + static int __init gdth_init_eisa(u16 eisa_adr,gdth_ha_str *ha) 662 662 { 663 - ulong32 retries,id; 664 - unchar prot_ver,eisacf,i,irq_found; 663 + u32 retries,id; 664 + u8 prot_ver,eisacf,i,irq_found; 665 665 666 666 TRACE(("gdth_init_eisa() adr. %x\n",eisa_adr)); 667 667 ··· 688 688 return 0; 689 689 } 690 690 ha->bmic = eisa_adr; 691 - ha->brd_phys = (ulong32)eisa_adr >> 12; 691 + ha->brd_phys = (u32)eisa_adr >> 12; 692 692 693 693 outl(0,eisa_adr+MAILBOXREG); 694 694 outl(0,eisa_adr+MAILBOXREG+4); ··· 752 752 #endif /* CONFIG_EISA */ 753 753 754 754 #ifdef CONFIG_ISA 755 - static int __init gdth_init_isa(ulong32 bios_adr,gdth_ha_str *ha) 755 + static int __init gdth_init_isa(u32 bios_adr,gdth_ha_str *ha) 756 756 { 757 757 register gdt2_dpram_str __iomem *dp2_ptr; 758 758 int i; 759 - unchar irq_drq,prot_ver; 760 - ulong32 retries; 759 + u8 irq_drq,prot_ver; 760 + u32 retries; 761 761 762 762 TRACE(("gdth_init_isa() bios adr. %x\n",bios_adr)); 763 763 ··· 812 812 } 813 813 gdth_delay(1); 814 814 } 815 - prot_ver = (unchar)readl(&dp2_ptr->u.ic.S_Info[0]); 815 + prot_ver = (u8)readl(&dp2_ptr->u.ic.S_Info[0]); 816 816 writeb(0, &dp2_ptr->u.ic.Status); 817 817 writeb(0xff, &dp2_ptr->io.irqdel); 818 818 if (prot_ver != PROTOCOL_VERSION) { ··· 859 859 register gdt6_dpram_str __iomem *dp6_ptr; 860 860 register gdt6c_dpram_str __iomem *dp6c_ptr; 861 861 register gdt6m_dpram_str __iomem *dp6m_ptr; 862 - ulong32 retries; 863 - unchar prot_ver; 864 - ushort command; 862 + u32 retries; 863 + u8 prot_ver; 864 + u16 command; 865 865 int i, found = FALSE; 866 866 867 867 TRACE(("gdth_init_pci()\n")); ··· 871 871 else 872 872 ha->oem_id = OEM_ID_ICP; 873 873 ha->brd_phys = (pdev->bus->number << 8) | (pdev->devfn & 0xf8); 874 - ha->stype = (ulong32)pdev->device; 874 + ha->stype = (u32)pdev->device; 875 875 ha->irq = pdev->irq; 876 876 ha->pdev = pdev; 877 877 ··· 891 891 found = FALSE; 892 892 for (i = 0xC8000; i < 0xE8000; i += 0x4000) { 893 893 iounmap(ha->brd); 894 - ha->brd = ioremap(i, sizeof(ushort)); 894 + ha->brd = ioremap(i, sizeof(u16)); 895 895 if (ha->brd == NULL) { 896 896 printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); 897 897 return 0; ··· 947 947 } 948 948 gdth_delay(1); 949 949 } 950 - prot_ver = (unchar)readl(&dp6_ptr->u.ic.S_Info[0]); 950 + prot_ver = (u8)readl(&dp6_ptr->u.ic.S_Info[0]); 951 951 writeb(0, &dp6_ptr->u.ic.S_Status); 952 952 writeb(0xff, &dp6_ptr->io.irqdel); 953 953 if (prot_ver != PROTOCOL_VERSION) { ··· 1000 1000 found = FALSE; 1001 1001 for (i = 0xC8000; i < 0xE8000; i += 0x4000) { 1002 1002 iounmap(ha->brd); 1003 - ha->brd = ioremap(i, sizeof(ushort)); 1003 + ha->brd = ioremap(i, sizeof(u16)); 1004 1004 if (ha->brd == NULL) { 1005 1005 printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); 1006 1006 return 0; ··· 1059 1059 } 1060 1060 gdth_delay(1); 1061 1061 } 1062 - prot_ver = (unchar)readl(&dp6c_ptr->u.ic.S_Info[0]); 1062 + prot_ver = (u8)readl(&dp6c_ptr->u.ic.S_Info[0]); 1063 1063 writeb(0, &dp6c_ptr->u.ic.Status); 1064 1064 if (prot_ver != PROTOCOL_VERSION) { 1065 1065 printk("GDT-PCI: Illegal protocol version\n"); ··· 1128 1128 found = FALSE; 1129 1129 for (i = 0xC8000; i < 0xE8000; i += 0x4000) { 1130 1130 iounmap(ha->brd); 1131 - ha->brd = ioremap(i, sizeof(ushort)); 1131 + ha->brd = ioremap(i, sizeof(u16)); 1132 1132 if (ha->brd == NULL) { 1133 1133 printk("GDT-PCI: Initialization error (DPMEM remap error)\n"); 1134 1134 return 0; ··· 1180 1180 } 1181 1181 gdth_delay(1); 1182 1182 } 1183 - prot_ver = (unchar)readl(&dp6m_ptr->u.ic.S_Info[0]); 1183 + prot_ver = (u8)readl(&dp6m_ptr->u.ic.S_Info[0]); 1184 1184 writeb(0, &dp6m_ptr->u.ic.S_Status); 1185 1185 if (prot_ver != PROTOCOL_VERSION) { 1186 1186 printk("GDT-PCI: Illegal protocol version\n"); ··· 1223 1223 } 1224 1224 gdth_delay(1); 1225 1225 } 1226 - prot_ver = (unchar)(readl(&dp6m_ptr->u.ic.S_Info[0]) >> 16); 1226 + prot_ver = (u8)(readl(&dp6m_ptr->u.ic.S_Info[0]) >> 16); 1227 1227 writeb(0, &dp6m_ptr->u.ic.S_Status); 1228 1228 if (prot_ver < 0x2b) /* FW < x.43: no 64-bit DMA support */ 1229 1229 ha->dma64_support = 0; ··· 1239 1239 1240 1240 static void __devinit gdth_enable_int(gdth_ha_str *ha) 1241 1241 { 1242 - ulong flags; 1242 + unsigned long flags; 1243 1243 gdt2_dpram_str __iomem *dp2_ptr; 1244 1244 gdt6_dpram_str __iomem *dp6_ptr; 1245 1245 gdt6m_dpram_str __iomem *dp6m_ptr; ··· 1274 1274 } 1275 1275 1276 1276 /* return IStatus if interrupt was from this card else 0 */ 1277 - static unchar gdth_get_status(gdth_ha_str *ha) 1277 + static u8 gdth_get_status(gdth_ha_str *ha) 1278 1278 { 1279 - unchar IStatus = 0; 1279 + u8 IStatus = 0; 1280 1280 1281 1281 TRACE(("gdth_get_status() irq %d ctr_count %d\n", ha->irq, gdth_ctr_count)); 1282 1282 1283 1283 if (ha->type == GDT_EISA) 1284 - IStatus = inb((ushort)ha->bmic + EDOORREG); 1284 + IStatus = inb((u16)ha->bmic + EDOORREG); 1285 1285 else if (ha->type == GDT_ISA) 1286 1286 IStatus = 1287 1287 readb(&((gdt2_dpram_str __iomem *)ha->brd)->u.ic.Cmd_Index); ··· 1329 1329 if (ha->cmd_tab[i].cmnd == UNUSED_CMND) { 1330 1330 ha->cmd_tab[i].cmnd = ha->pccb->RequestBuffer; 1331 1331 ha->cmd_tab[i].service = ha->pccb->Service; 1332 - ha->pccb->CommandIndex = (ulong32)i+2; 1332 + ha->pccb->CommandIndex = (u32)i+2; 1333 1333 return (i+2); 1334 1334 } 1335 1335 } ··· 1362 1362 register gdt6c_dpram_str __iomem *dp6c_ptr; 1363 1363 gdt6_dpram_str __iomem *dp6_ptr; 1364 1364 gdt2_dpram_str __iomem *dp2_ptr; 1365 - ushort cp_count,dp_offset,cmd_no; 1365 + u16 cp_count,dp_offset,cmd_no; 1366 1366 1367 1367 TRACE(("gdth_copy_command() hanum %d\n", ha->hanum)); 1368 1368 ··· 1386 1386 dp2_ptr = ha->brd; 1387 1387 writew(dp_offset + DPMEM_COMMAND_OFFSET, 1388 1388 &dp2_ptr->u.ic.comm_queue[cmd_no].offset); 1389 - writew((ushort)cmd_ptr->Service, 1389 + writew((u16)cmd_ptr->Service, 1390 1390 &dp2_ptr->u.ic.comm_queue[cmd_no].serv_id); 1391 1391 memcpy_toio(&dp2_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); 1392 1392 } else if (ha->type == GDT_PCI) { 1393 1393 dp6_ptr = ha->brd; 1394 1394 writew(dp_offset + DPMEM_COMMAND_OFFSET, 1395 1395 &dp6_ptr->u.ic.comm_queue[cmd_no].offset); 1396 - writew((ushort)cmd_ptr->Service, 1396 + writew((u16)cmd_ptr->Service, 1397 1397 &dp6_ptr->u.ic.comm_queue[cmd_no].serv_id); 1398 1398 memcpy_toio(&dp6_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); 1399 1399 } else if (ha->type == GDT_PCINEW) { 1400 1400 dp6c_ptr = ha->brd; 1401 1401 writew(dp_offset + DPMEM_COMMAND_OFFSET, 1402 1402 &dp6c_ptr->u.ic.comm_queue[cmd_no].offset); 1403 - writew((ushort)cmd_ptr->Service, 1403 + writew((u16)cmd_ptr->Service, 1404 1404 &dp6c_ptr->u.ic.comm_queue[cmd_no].serv_id); 1405 1405 memcpy_toio(&dp6c_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); 1406 1406 } else if (ha->type == GDT_PCIMPR) { 1407 1407 dp6m_ptr = ha->brd; 1408 1408 writew(dp_offset + DPMEM_COMMAND_OFFSET, 1409 1409 &dp6m_ptr->u.ic.comm_queue[cmd_no].offset); 1410 - writew((ushort)cmd_ptr->Service, 1410 + writew((u16)cmd_ptr->Service, 1411 1411 &dp6m_ptr->u.ic.comm_queue[cmd_no].serv_id); 1412 1412 memcpy_toio(&dp6m_ptr->u.ic.gdt_dpr_cmd[dp_offset],cmd_ptr,cp_count); 1413 1413 } ··· 1420 1420 1421 1421 #ifdef GDTH_STATISTICS 1422 1422 { 1423 - ulong32 i,j; 1423 + u32 i,j; 1424 1424 for (i=0,j=0; j<GDTH_MAXCMDS; ++j) { 1425 1425 if (ha->cmd_tab[j].cmnd != UNUSED_CMND) 1426 1426 ++i; 1427 1427 } 1428 1428 if (max_index < i) { 1429 1429 max_index = i; 1430 - TRACE3(("GDT: max_index = %d\n",(ushort)i)); 1430 + TRACE3(("GDT: max_index = %d\n",(u16)i)); 1431 1431 } 1432 1432 } 1433 1433 #endif ··· 1450 1450 } 1451 1451 } 1452 1452 1453 - static int gdth_wait(gdth_ha_str *ha, int index, ulong32 time) 1453 + static int gdth_wait(gdth_ha_str *ha, int index, u32 time) 1454 1454 { 1455 1455 int answer_found = FALSE; 1456 1456 int wait_index = 0; ··· 1476 1476 } 1477 1477 1478 1478 1479 - static int gdth_internal_cmd(gdth_ha_str *ha, unchar service, ushort opcode, 1480 - ulong32 p1, ulong64 p2, ulong64 p3) 1479 + static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode, 1480 + u32 p1, u64 p2, u64 p3) 1481 1481 { 1482 1482 register gdth_cmd_str *cmd_ptr; 1483 1483 int retries,index; ··· 1501 1501 if (service == CACHESERVICE) { 1502 1502 if (opcode == GDT_IOCTL) { 1503 1503 cmd_ptr->u.ioctl.subfunc = p1; 1504 - cmd_ptr->u.ioctl.channel = (ulong32)p2; 1505 - cmd_ptr->u.ioctl.param_size = (ushort)p3; 1504 + cmd_ptr->u.ioctl.channel = (u32)p2; 1505 + cmd_ptr->u.ioctl.param_size = (u16)p3; 1506 1506 cmd_ptr->u.ioctl.p_param = ha->scratch_phys; 1507 1507 } else { 1508 1508 if (ha->cache_feat & GDT_64BIT) { 1509 - cmd_ptr->u.cache64.DeviceNo = (ushort)p1; 1509 + cmd_ptr->u.cache64.DeviceNo = (u16)p1; 1510 1510 cmd_ptr->u.cache64.BlockNo = p2; 1511 1511 } else { 1512 - cmd_ptr->u.cache.DeviceNo = (ushort)p1; 1513 - cmd_ptr->u.cache.BlockNo = (ulong32)p2; 1512 + cmd_ptr->u.cache.DeviceNo = (u16)p1; 1513 + cmd_ptr->u.cache.BlockNo = (u32)p2; 1514 1514 } 1515 1515 } 1516 1516 } else if (service == SCSIRAWSERVICE) { 1517 1517 if (ha->raw_feat & GDT_64BIT) { 1518 1518 cmd_ptr->u.raw64.direction = p1; 1519 - cmd_ptr->u.raw64.bus = (unchar)p2; 1520 - cmd_ptr->u.raw64.target = (unchar)p3; 1521 - cmd_ptr->u.raw64.lun = (unchar)(p3 >> 8); 1519 + cmd_ptr->u.raw64.bus = (u8)p2; 1520 + cmd_ptr->u.raw64.target = (u8)p3; 1521 + cmd_ptr->u.raw64.lun = (u8)(p3 >> 8); 1522 1522 } else { 1523 1523 cmd_ptr->u.raw.direction = p1; 1524 - cmd_ptr->u.raw.bus = (unchar)p2; 1525 - cmd_ptr->u.raw.target = (unchar)p3; 1526 - cmd_ptr->u.raw.lun = (unchar)(p3 >> 8); 1524 + cmd_ptr->u.raw.bus = (u8)p2; 1525 + cmd_ptr->u.raw.target = (u8)p3; 1526 + cmd_ptr->u.raw.lun = (u8)(p3 >> 8); 1527 1527 } 1528 1528 } else if (service == SCREENSERVICE) { 1529 1529 if (opcode == GDT_REALTIME) { 1530 - *(ulong32 *)&cmd_ptr->u.screen.su.data[0] = p1; 1531 - *(ulong32 *)&cmd_ptr->u.screen.su.data[4] = (ulong32)p2; 1532 - *(ulong32 *)&cmd_ptr->u.screen.su.data[8] = (ulong32)p3; 1530 + *(u32 *)&cmd_ptr->u.screen.su.data[0] = p1; 1531 + *(u32 *)&cmd_ptr->u.screen.su.data[4] = (u32)p2; 1532 + *(u32 *)&cmd_ptr->u.screen.su.data[8] = (u32)p3; 1533 1533 } 1534 1534 } 1535 1535 ha->cmd_len = sizeof(gdth_cmd_str); ··· 1555 1555 1556 1556 static int __devinit gdth_search_drives(gdth_ha_str *ha) 1557 1557 { 1558 - ushort cdev_cnt, i; 1558 + u16 cdev_cnt, i; 1559 1559 int ok; 1560 - ulong32 bus_no, drv_cnt, drv_no, j; 1560 + u32 bus_no, drv_cnt, drv_no, j; 1561 1561 gdth_getch_str *chn; 1562 1562 gdth_drlist_str *drl; 1563 1563 gdth_iochan_str *ioc; ··· 1570 1570 #endif 1571 1571 1572 1572 #ifdef GDTH_RTC 1573 - unchar rtc[12]; 1574 - ulong flags; 1573 + u8 rtc[12]; 1574 + unsigned long flags; 1575 1575 #endif 1576 1576 1577 1577 TRACE(("gdth_search_drives() hanum %d\n", ha->hanum)); ··· 1584 1584 if (ok) 1585 1585 ha->screen_feat = GDT_64BIT; 1586 1586 } 1587 - if (force_dma32 || (!ok && ha->status == (ushort)S_NOFUNC)) 1587 + if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) 1588 1588 ok = gdth_internal_cmd(ha, SCREENSERVICE, GDT_INIT, 0, 0, 0); 1589 1589 if (!ok) { 1590 1590 printk("GDT-HA %d: Initialization error screen service (code %d)\n", ··· 1609 1609 rtc[j] = CMOS_READ(j); 1610 1610 } while (rtc[0] != CMOS_READ(0)); 1611 1611 spin_unlock_irqrestore(&rtc_lock, flags); 1612 - TRACE2(("gdth_search_drives(): RTC: %x/%x/%x\n",*(ulong32 *)&rtc[0], 1613 - *(ulong32 *)&rtc[4], *(ulong32 *)&rtc[8])); 1612 + TRACE2(("gdth_search_drives(): RTC: %x/%x/%x\n",*(u32 *)&rtc[0], 1613 + *(u32 *)&rtc[4], *(u32 *)&rtc[8])); 1614 1614 /* 3. send to controller firmware */ 1615 - gdth_internal_cmd(ha, SCREENSERVICE, GDT_REALTIME, *(ulong32 *)&rtc[0], 1616 - *(ulong32 *)&rtc[4], *(ulong32 *)&rtc[8]); 1615 + gdth_internal_cmd(ha, SCREENSERVICE, GDT_REALTIME, *(u32 *)&rtc[0], 1616 + *(u32 *)&rtc[4], *(u32 *)&rtc[8]); 1617 1617 #endif 1618 1618 1619 1619 /* unfreeze all IOs */ ··· 1627 1627 if (ok) 1628 1628 ha->cache_feat = GDT_64BIT; 1629 1629 } 1630 - if (force_dma32 || (!ok && ha->status == (ushort)S_NOFUNC)) 1630 + if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) 1631 1631 ok = gdth_internal_cmd(ha, CACHESERVICE, GDT_INIT, LINUX_OS, 0, 0); 1632 1632 if (!ok) { 1633 1633 printk("GDT-HA %d: Initialization error cache service (code %d)\n", ··· 1635 1635 return 0; 1636 1636 } 1637 1637 TRACE2(("gdth_search_drives(): CACHESERVICE initialized\n")); 1638 - cdev_cnt = (ushort)ha->info; 1638 + cdev_cnt = (u16)ha->info; 1639 1639 ha->fw_vers = ha->service; 1640 1640 1641 1641 #ifdef INT_COAL ··· 1644 1644 pmod = (gdth_perf_modes *)ha->pscratch; 1645 1645 pmod->version = 1; 1646 1646 pmod->st_mode = 1; /* enable one status buffer */ 1647 - *((ulong64 *)&pmod->st_buff_addr1) = ha->coal_stat_phys; 1647 + *((u64 *)&pmod->st_buff_addr1) = ha->coal_stat_phys; 1648 1648 pmod->st_buff_indx1 = COALINDEX; 1649 1649 pmod->st_buff_addr2 = 0; 1650 1650 pmod->st_buff_u_addr2 = 0; ··· 1705 1705 else 1706 1706 ha->bus_id[bus_no] = 0xff; 1707 1707 } 1708 - ha->bus_cnt = (unchar)bus_no; 1708 + ha->bus_cnt = (u8)bus_no; 1709 1709 } 1710 1710 TRACE2(("gdth_search_drives() %d channels\n",ha->bus_cnt)); 1711 1711 ··· 1789 1789 1790 1790 /* logical drives */ 1791 1791 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, CACHE_DRV_CNT, 1792 - INVALID_CHANNEL,sizeof(ulong32))) { 1793 - drv_cnt = *(ulong32 *)ha->pscratch; 1792 + INVALID_CHANNEL,sizeof(u32))) { 1793 + drv_cnt = *(u32 *)ha->pscratch; 1794 1794 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, CACHE_DRV_LIST, 1795 - INVALID_CHANNEL,drv_cnt * sizeof(ulong32))) { 1795 + INVALID_CHANNEL,drv_cnt * sizeof(u32))) { 1796 1796 for (j = 0; j < drv_cnt; ++j) { 1797 - drv_no = ((ulong32 *)ha->pscratch)[j]; 1797 + drv_no = ((u32 *)ha->pscratch)[j]; 1798 1798 if (drv_no < MAX_LDRIVES) { 1799 1799 ha->hdr[drv_no].is_logdrv = TRUE; 1800 1800 TRACE2(("Drive %d is log. drive\n",drv_no)); ··· 1838 1838 if (ok) 1839 1839 ha->raw_feat = GDT_64BIT; 1840 1840 } 1841 - if (force_dma32 || (!ok && ha->status == (ushort)S_NOFUNC)) 1841 + if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) 1842 1842 ok = gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_INIT, 0, 0, 0); 1843 1843 if (!ok) { 1844 1844 printk("GDT-HA %d: Initialization error raw service (code %d)\n", ··· 1854 1854 if (gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_GET_FEAT, 0, 0, 0)) { 1855 1855 TRACE2(("gdth_search_dr(): get feat RAWSERVICE %d\n", 1856 1856 ha->info)); 1857 - ha->raw_feat |= (ushort)ha->info; 1857 + ha->raw_feat |= (u16)ha->info; 1858 1858 } 1859 1859 } 1860 1860 ··· 1865 1865 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_GET_FEAT, 0, 0, 0)) { 1866 1866 TRACE2(("gdth_search_dr(): get feat CACHESERV. %d\n", 1867 1867 ha->info)); 1868 - ha->cache_feat |= (ushort)ha->info; 1868 + ha->cache_feat |= (u16)ha->info; 1869 1869 } 1870 1870 } 1871 1871 ··· 1923 1923 return 1; 1924 1924 } 1925 1925 1926 - static int gdth_analyse_hdrive(gdth_ha_str *ha, ushort hdrive) 1926 + static int gdth_analyse_hdrive(gdth_ha_str *ha, u16 hdrive) 1927 1927 { 1928 - ulong32 drv_cyls; 1928 + u32 drv_cyls; 1929 1929 int drv_hds, drv_secs; 1930 1930 1931 1931 TRACE(("gdth_analyse_hdrive() hanum %d drive %d\n", ha->hanum, hdrive)); ··· 1944 1944 } else { 1945 1945 drv_hds = ha->info2 & 0xff; 1946 1946 drv_secs = (ha->info2 >> 8) & 0xff; 1947 - drv_cyls = (ulong32)ha->hdr[hdrive].size / drv_hds / drv_secs; 1947 + drv_cyls = (u32)ha->hdr[hdrive].size / drv_hds / drv_secs; 1948 1948 } 1949 - ha->hdr[hdrive].heads = (unchar)drv_hds; 1950 - ha->hdr[hdrive].secs = (unchar)drv_secs; 1949 + ha->hdr[hdrive].heads = (u8)drv_hds; 1950 + ha->hdr[hdrive].secs = (u8)drv_secs; 1951 1951 /* round size */ 1952 1952 ha->hdr[hdrive].size = drv_cyls * drv_hds * drv_secs; 1953 1953 1954 1954 if (ha->cache_feat & GDT_64BIT) { 1955 1955 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_X_INFO, hdrive, 0, 0) 1956 1956 && ha->info2 != 0) { 1957 - ha->hdr[hdrive].size = ((ulong64)ha->info2 << 32) | ha->info; 1957 + ha->hdr[hdrive].size = ((u64)ha->info2 << 32) | ha->info; 1958 1958 } 1959 1959 } 1960 1960 TRACE2(("gdth_search_dr() cdr. %d size %d hds %d scs %d\n", ··· 1964 1964 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_DEVTYPE, hdrive, 0, 0)) { 1965 1965 TRACE2(("gdth_search_dr() cache drive %d devtype %d\n", 1966 1966 hdrive,ha->info)); 1967 - ha->hdr[hdrive].devtype = (ushort)ha->info; 1967 + ha->hdr[hdrive].devtype = (u16)ha->info; 1968 1968 } 1969 1969 1970 1970 /* cluster info */ ··· 1972 1972 TRACE2(("gdth_search_dr() cache drive %d cluster info %d\n", 1973 1973 hdrive,ha->info)); 1974 1974 if (!shared_access) 1975 - ha->hdr[hdrive].cluster_type = (unchar)ha->info; 1975 + ha->hdr[hdrive].cluster_type = (u8)ha->info; 1976 1976 } 1977 1977 1978 1978 /* R/W attributes */ 1979 1979 if (gdth_internal_cmd(ha, CACHESERVICE, GDT_RW_ATTRIBS, hdrive, 0, 0)) { 1980 1980 TRACE2(("gdth_search_dr() cache drive %d r/w attrib. %d\n", 1981 1981 hdrive,ha->info)); 1982 - ha->hdr[hdrive].rw_attribs = (unchar)ha->info; 1982 + ha->hdr[hdrive].rw_attribs = (u8)ha->info; 1983 1983 } 1984 1984 1985 1985 return 1; ··· 1988 1988 1989 1989 /* command queueing/sending functions */ 1990 1990 1991 - static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority) 1991 + static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 priority) 1992 1992 { 1993 1993 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); 1994 1994 register Scsi_Cmnd *pscp; 1995 1995 register Scsi_Cmnd *nscp; 1996 - ulong flags; 1996 + unsigned long flags; 1997 1997 1998 1998 TRACE(("gdth_putq() priority %d\n",priority)); 1999 1999 spin_lock_irqsave(&ha->smp_lock, flags); ··· 2023 2023 ++flags; 2024 2024 if (max_rq < flags) { 2025 2025 max_rq = flags; 2026 - TRACE3(("GDT: max_rq = %d\n",(ushort)max_rq)); 2026 + TRACE3(("GDT: max_rq = %d\n",(u16)max_rq)); 2027 2027 } 2028 2028 #endif 2029 2029 } ··· 2032 2032 { 2033 2033 register Scsi_Cmnd *pscp; 2034 2034 register Scsi_Cmnd *nscp; 2035 - unchar b, t, l, firsttime; 2036 - unchar this_cmd, next_cmd; 2037 - ulong flags = 0; 2035 + u8 b, t, l, firsttime; 2036 + u8 this_cmd, next_cmd; 2037 + unsigned long flags = 0; 2038 2038 int cmd_index; 2039 2039 2040 2040 TRACE(("gdth_next() hanum %d\n", ha->hanum)); ··· 2282 2282 * buffers, kmap_atomic() as needed. 2283 2283 */ 2284 2284 static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, 2285 - char *buffer, ushort count) 2285 + char *buffer, u16 count) 2286 2286 { 2287 - ushort cpcount,i, max_sg = scsi_sg_count(scp); 2288 - ushort cpsum,cpnow; 2287 + u16 cpcount,i, max_sg = scsi_sg_count(scp); 2288 + u16 cpsum,cpnow; 2289 2289 struct scatterlist *sl; 2290 2290 char *address; 2291 2291 2292 - cpcount = min_t(ushort, count, scsi_bufflen(scp)); 2292 + cpcount = min_t(u16, count, scsi_bufflen(scp)); 2293 2293 2294 2294 if (cpcount) { 2295 2295 cpsum=0; 2296 2296 scsi_for_each_sg(scp, sl, max_sg, i) { 2297 2297 unsigned long flags; 2298 - cpnow = (ushort)sl->length; 2298 + cpnow = (u16)sl->length; 2299 2299 TRACE(("copy_internal() now %d sum %d count %d %d\n", 2300 2300 cpnow, cpsum, cpcount, scsi_bufflen(scp))); 2301 2301 if (cpsum+cpnow > cpcount) ··· 2325 2325 2326 2326 static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp) 2327 2327 { 2328 - unchar t; 2328 + u8 t; 2329 2329 gdth_inq_data inq; 2330 2330 gdth_rdcap_data rdc; 2331 2331 gdth_sense_data sd; ··· 2389 2389 2390 2390 case READ_CAPACITY: 2391 2391 TRACE2(("Read capacity hdrive %d\n",t)); 2392 - if (ha->hdr[t].size > (ulong64)0xffffffff) 2392 + if (ha->hdr[t].size > (u64)0xffffffff) 2393 2393 rdc.last_block_no = 0xffffffff; 2394 2394 else 2395 2395 rdc.last_block_no = cpu_to_be32(ha->hdr[t].size-1); ··· 2425 2425 return 0; 2426 2426 } 2427 2427 2428 - static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive) 2428 + static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u16 hdrive) 2429 2429 { 2430 2430 register gdth_cmd_str *cmdp; 2431 2431 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); 2432 - ulong32 cnt, blockcnt; 2433 - ulong64 no, blockno; 2432 + u32 cnt, blockcnt; 2433 + u64 no, blockno; 2434 2434 int i, cmd_index, read_write, sgcnt, mode64; 2435 2435 2436 2436 cmdp = ha->pccb; ··· 2498 2498 2499 2499 if (read_write) { 2500 2500 if (scp->cmd_len == 16) { 2501 - memcpy(&no, &scp->cmnd[2], sizeof(ulong64)); 2501 + memcpy(&no, &scp->cmnd[2], sizeof(u64)); 2502 2502 blockno = be64_to_cpu(no); 2503 - memcpy(&cnt, &scp->cmnd[10], sizeof(ulong32)); 2503 + memcpy(&cnt, &scp->cmnd[10], sizeof(u32)); 2504 2504 blockcnt = be32_to_cpu(cnt); 2505 2505 } else if (scp->cmd_len == 10) { 2506 - memcpy(&no, &scp->cmnd[2], sizeof(ulong32)); 2506 + memcpy(&no, &scp->cmnd[2], sizeof(u32)); 2507 2507 blockno = be32_to_cpu(no); 2508 - memcpy(&cnt, &scp->cmnd[7], sizeof(ushort)); 2508 + memcpy(&cnt, &scp->cmnd[7], sizeof(u16)); 2509 2509 blockcnt = be16_to_cpu(cnt); 2510 2510 } else { 2511 - memcpy(&no, &scp->cmnd[0], sizeof(ulong32)); 2511 + memcpy(&no, &scp->cmnd[0], sizeof(u32)); 2512 2512 blockno = be32_to_cpu(no) & 0x001fffffUL; 2513 2513 blockcnt= scp->cmnd[4]==0 ? 0x100 : scp->cmnd[4]; 2514 2514 } ··· 2516 2516 cmdp->u.cache64.BlockNo = blockno; 2517 2517 cmdp->u.cache64.BlockCnt = blockcnt; 2518 2518 } else { 2519 - cmdp->u.cache.BlockNo = (ulong32)blockno; 2519 + cmdp->u.cache.BlockNo = (u32)blockno; 2520 2520 cmdp->u.cache.BlockCnt = blockcnt; 2521 2521 } 2522 2522 ··· 2528 2528 if (mode64) { 2529 2529 struct scatterlist *sl; 2530 2530 2531 - cmdp->u.cache64.DestAddr= (ulong64)-1; 2531 + cmdp->u.cache64.DestAddr= (u64)-1; 2532 2532 cmdp->u.cache64.sg_canz = sgcnt; 2533 2533 scsi_for_each_sg(scp, sl, sgcnt, i) { 2534 2534 cmdp->u.cache64.sg_lst[i].sg_ptr = sg_dma_address(sl); 2535 2535 #ifdef GDTH_DMA_STATISTICS 2536 - if (cmdp->u.cache64.sg_lst[i].sg_ptr > (ulong64)0xffffffff) 2536 + if (cmdp->u.cache64.sg_lst[i].sg_ptr > (u64)0xffffffff) 2537 2537 ha->dma64_cnt++; 2538 2538 else 2539 2539 ha->dma32_cnt++; ··· 2555 2555 } 2556 2556 2557 2557 #ifdef GDTH_STATISTICS 2558 - if (max_sg < (ulong32)sgcnt) { 2559 - max_sg = (ulong32)sgcnt; 2558 + if (max_sg < (u32)sgcnt) { 2559 + max_sg = (u32)sgcnt; 2560 2560 TRACE3(("GDT: max_sg = %d\n",max_sg)); 2561 2561 } 2562 2562 #endif ··· 2572 2572 TRACE(("cache cmd: cmd %d blockno. %d, blockcnt %d\n", 2573 2573 cmdp->OpCode,cmdp->u.cache64.BlockNo,cmdp->u.cache64.BlockCnt)); 2574 2574 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.cache64.sg_lst) + 2575 - (ushort)cmdp->u.cache64.sg_canz * sizeof(gdth_sg64_str); 2575 + (u16)cmdp->u.cache64.sg_canz * sizeof(gdth_sg64_str); 2576 2576 } else { 2577 2577 TRACE(("cache cmd: addr. %x sganz %x sgptr0 %x sglen0 %x\n", 2578 2578 cmdp->u.cache.DestAddr,cmdp->u.cache.sg_canz, ··· 2581 2581 TRACE(("cache cmd: cmd %d blockno. %d, blockcnt %d\n", 2582 2582 cmdp->OpCode,cmdp->u.cache.BlockNo,cmdp->u.cache.BlockCnt)); 2583 2583 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.cache.sg_lst) + 2584 - (ushort)cmdp->u.cache.sg_canz * sizeof(gdth_sg_str); 2584 + (u16)cmdp->u.cache.sg_canz * sizeof(gdth_sg_str); 2585 2585 } 2586 2586 if (ha->cmd_len & 3) 2587 2587 ha->cmd_len += (4 - (ha->cmd_len & 3)); ··· 2600 2600 return cmd_index; 2601 2601 } 2602 2602 2603 - static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar b) 2603 + static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 b) 2604 2604 { 2605 2605 register gdth_cmd_str *cmdp; 2606 - ushort i; 2606 + u16 i; 2607 2607 dma_addr_t sense_paddr; 2608 2608 int cmd_index, sgcnt, mode64; 2609 - unchar t,l; 2609 + u8 t,l; 2610 2610 struct page *page; 2611 - ulong offset; 2611 + unsigned long offset; 2612 2612 struct gdth_cmndinfo *cmndinfo; 2613 2613 2614 2614 t = scp->device->id; ··· 2654 2654 2655 2655 } else { 2656 2656 page = virt_to_page(scp->sense_buffer); 2657 - offset = (ulong)scp->sense_buffer & ~PAGE_MASK; 2657 + offset = (unsigned long)scp->sense_buffer & ~PAGE_MASK; 2658 2658 sense_paddr = pci_map_page(ha->pdev,page,offset, 2659 2659 16,PCI_DMA_FROMDEVICE); 2660 2660 ··· 2703 2703 if (mode64) { 2704 2704 struct scatterlist *sl; 2705 2705 2706 - cmdp->u.raw64.sdata = (ulong64)-1; 2706 + cmdp->u.raw64.sdata = (u64)-1; 2707 2707 cmdp->u.raw64.sg_ranz = sgcnt; 2708 2708 scsi_for_each_sg(scp, sl, sgcnt, i) { 2709 2709 cmdp->u.raw64.sg_lst[i].sg_ptr = sg_dma_address(sl); 2710 2710 #ifdef GDTH_DMA_STATISTICS 2711 - if (cmdp->u.raw64.sg_lst[i].sg_ptr > (ulong64)0xffffffff) 2711 + if (cmdp->u.raw64.sg_lst[i].sg_ptr > (u64)0xffffffff) 2712 2712 ha->dma64_cnt++; 2713 2713 else 2714 2714 ha->dma32_cnt++; ··· 2744 2744 cmdp->u.raw64.sg_lst[0].sg_len)); 2745 2745 /* evaluate command size */ 2746 2746 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw64.sg_lst) + 2747 - (ushort)cmdp->u.raw64.sg_ranz * sizeof(gdth_sg64_str); 2747 + (u16)cmdp->u.raw64.sg_ranz * sizeof(gdth_sg64_str); 2748 2748 } else { 2749 2749 TRACE(("raw cmd: addr. %x sganz %x sgptr0 %x sglen0 %x\n", 2750 2750 cmdp->u.raw.sdata,cmdp->u.raw.sg_ranz, ··· 2752 2752 cmdp->u.raw.sg_lst[0].sg_len)); 2753 2753 /* evaluate command size */ 2754 2754 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw.sg_lst) + 2755 - (ushort)cmdp->u.raw.sg_ranz * sizeof(gdth_sg_str); 2755 + (u16)cmdp->u.raw.sg_ranz * sizeof(gdth_sg_str); 2756 2756 } 2757 2757 } 2758 2758 /* check space */ ··· 2802 2802 if (cmdp->OpCode == GDT_IOCTL) { 2803 2803 TRACE2(("IOCTL\n")); 2804 2804 ha->cmd_len = 2805 - GDTOFFSOF(gdth_cmd_str,u.ioctl.p_param) + sizeof(ulong64); 2805 + GDTOFFSOF(gdth_cmd_str,u.ioctl.p_param) + sizeof(u64); 2806 2806 } else if (cmdp->Service == CACHESERVICE) { 2807 2807 TRACE2(("cache command %d\n",cmdp->OpCode)); 2808 2808 if (ha->cache_feat & GDT_64BIT) ··· 2840 2840 2841 2841 2842 2842 /* Controller event handling functions */ 2843 - static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, ushort source, 2844 - ushort idx, gdth_evt_data *evt) 2843 + static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, u16 source, 2844 + u16 idx, gdth_evt_data *evt) 2845 2845 { 2846 2846 gdth_evt_str *e; 2847 2847 struct timeval tv; ··· 2890 2890 { 2891 2891 gdth_evt_str *e; 2892 2892 int eindex; 2893 - ulong flags; 2893 + unsigned long flags; 2894 2894 2895 2895 TRACE2(("gdth_read_event() handle %d\n", handle)); 2896 2896 spin_lock_irqsave(&ha->smp_lock, flags); ··· 2919 2919 } 2920 2920 2921 2921 static void gdth_readapp_event(gdth_ha_str *ha, 2922 - unchar application, gdth_evt_str *estr) 2922 + u8 application, gdth_evt_str *estr) 2923 2923 { 2924 2924 gdth_evt_str *e; 2925 2925 int eindex; 2926 - ulong flags; 2927 - unchar found = FALSE; 2926 + unsigned long flags; 2927 + u8 found = FALSE; 2928 2928 2929 2929 TRACE2(("gdth_readapp_event() app. %d\n", application)); 2930 2930 spin_lock_irqsave(&ha->smp_lock, flags); ··· 2969 2969 gdt2_dpram_str __iomem *dp2_ptr; 2970 2970 Scsi_Cmnd *scp; 2971 2971 int rval, i; 2972 - unchar IStatus; 2973 - ushort Service; 2974 - ulong flags = 0; 2972 + u8 IStatus; 2973 + u16 Service; 2974 + unsigned long flags = 0; 2975 2975 #ifdef INT_COAL 2976 2976 int coalesced = FALSE; 2977 2977 int next = FALSE; ··· 3018 3018 if (coalesced) { 3019 3019 /* For coalesced requests all status 3020 3020 information is found in the status buffer */ 3021 - IStatus = (unchar)(pcs->status & 0xff); 3021 + IStatus = (u8)(pcs->status & 0xff); 3022 3022 } 3023 3023 #endif 3024 3024 ··· 3197 3197 ++act_int_coal; 3198 3198 if (act_int_coal > max_int_coal) { 3199 3199 max_int_coal = act_int_coal; 3200 - printk("GDT: max_int_coal = %d\n",(ushort)max_int_coal); 3200 + printk("GDT: max_int_coal = %d\n",(u16)max_int_coal); 3201 3201 } 3202 3202 #endif 3203 3203 /* see if there is another status */ ··· 3225 3225 return __gdth_interrupt(ha, false, NULL); 3226 3226 } 3227 3227 3228 - static int gdth_sync_event(gdth_ha_str *ha, int service, unchar index, 3228 + static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, 3229 3229 Scsi_Cmnd *scp) 3230 3230 { 3231 3231 gdth_msg_str *msg; 3232 3232 gdth_cmd_str *cmdp; 3233 - unchar b, t; 3233 + u8 b, t; 3234 3234 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); 3235 3235 3236 3236 cmdp = ha->pccb; ··· 3263 3263 cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; 3264 3264 ha->cmd_offs_dpmem = 0; 3265 3265 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) 3266 - + sizeof(ulong64); 3266 + + sizeof(u64); 3267 3267 ha->cmd_cnt = 0; 3268 3268 gdth_copy_command(ha); 3269 3269 gdth_release_event(ha); ··· 3297 3297 cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; 3298 3298 ha->cmd_offs_dpmem = 0; 3299 3299 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) 3300 - + sizeof(ulong64); 3300 + + sizeof(u64); 3301 3301 ha->cmd_cnt = 0; 3302 3302 gdth_copy_command(ha); 3303 3303 gdth_release_event(ha); ··· 3335 3335 cmndinfo->OpCode)); 3336 3336 /* special commands GDT_CLUST_INFO/GDT_MOUNT ? */ 3337 3337 if (cmndinfo->OpCode == GDT_CLUST_INFO) { 3338 - ha->hdr[t].cluster_type = (unchar)ha->info; 3338 + ha->hdr[t].cluster_type = (u8)ha->info; 3339 3339 if (!(ha->hdr[t].cluster_type & 3340 3340 CLUSTER_MOUNTED)) { 3341 3341 /* NOT MOUNTED -> MOUNT */ ··· 3397 3397 ha->hdr[t].cluster_type &= ~CLUSTER_RESERVED; 3398 3398 } 3399 3399 memset((char*)scp->sense_buffer,0,16); 3400 - if (ha->status == (ushort)S_CACHE_RESERV) { 3400 + if (ha->status == (u16)S_CACHE_RESERV) { 3401 3401 scp->result = (DID_OK << 16) | (RESERVATION_CONFLICT << 1); 3402 3402 } else { 3403 3403 scp->sense_buffer[0] = 0x70; ··· 3614 3614 cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; 3615 3615 ha->cmd_offs_dpmem = 0; 3616 3616 ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) 3617 - + sizeof(ulong64); 3617 + + sizeof(u64); 3618 3618 ha->cmd_cnt = 0; 3619 3619 gdth_copy_command(ha); 3620 3620 if (ha->type == GDT_EISA) 3621 - printk("[EISA slot %d] ",(ushort)ha->brd_phys); 3621 + printk("[EISA slot %d] ",(u16)ha->brd_phys); 3622 3622 else if (ha->type == GDT_ISA) 3623 - printk("[DPMEM 0x%4X] ",(ushort)ha->brd_phys); 3623 + printk("[DPMEM 0x%4X] ",(u16)ha->brd_phys); 3624 3624 else 3625 - printk("[PCI %d/%d] ",(ushort)(ha->brd_phys>>8), 3626 - (ushort)((ha->brd_phys>>3)&0x1f)); 3625 + printk("[PCI %d/%d] ",(u16)(ha->brd_phys>>8), 3626 + (u16)((ha->brd_phys>>3)&0x1f)); 3627 3627 gdth_release_event(ha); 3628 3628 } 3629 3629 ··· 3640 3640 ha->dvr.eu.async.service = ha->service; 3641 3641 ha->dvr.eu.async.status = ha->status; 3642 3642 ha->dvr.eu.async.info = ha->info; 3643 - *(ulong32 *)ha->dvr.eu.async.scsi_coord = ha->info2; 3643 + *(u32 *)ha->dvr.eu.async.scsi_coord = ha->info2; 3644 3644 } 3645 3645 gdth_store_event( ha, ES_ASYNC, ha->service, &ha->dvr ); 3646 3646 gdth_log_event( &ha->dvr, NULL ); ··· 3648 3648 /* new host drive from expand? */ 3649 3649 if (ha->service == CACHESERVICE && ha->status == 56) { 3650 3650 TRACE2(("gdth_async_event(): new host drive %d created\n", 3651 - (ushort)ha->info)); 3652 - /* gdth_analyse_hdrive(hanum, (ushort)ha->info); */ 3651 + (u16)ha->info)); 3652 + /* gdth_analyse_hdrive(hanum, (u16)ha->info); */ 3653 3653 } 3654 3654 } 3655 3655 return 1; ··· 3680 3680 for (j=0,i=1; i < f[0]; i+=2) { 3681 3681 switch (f[i+1]) { 3682 3682 case 4: 3683 - stack.b[j++] = *(ulong32*)&dvr->eu.stream[(int)f[i]]; 3683 + stack.b[j++] = *(u32*)&dvr->eu.stream[(int)f[i]]; 3684 3684 break; 3685 3685 case 2: 3686 - stack.b[j++] = *(ushort*)&dvr->eu.stream[(int)f[i]]; 3686 + stack.b[j++] = *(u16*)&dvr->eu.stream[(int)f[i]]; 3687 3687 break; 3688 3688 case 1: 3689 - stack.b[j++] = *(unchar*)&dvr->eu.stream[(int)f[i]]; 3689 + stack.b[j++] = *(u8*)&dvr->eu.stream[(int)f[i]]; 3690 3690 break; 3691 3691 default: 3692 3692 break; ··· 3712 3712 } 3713 3713 3714 3714 #ifdef GDTH_STATISTICS 3715 - static unchar gdth_timer_running; 3715 + static u8 gdth_timer_running; 3716 3716 3717 - static void gdth_timeout(ulong data) 3717 + static void gdth_timeout(unsigned long data) 3718 3718 { 3719 - ulong32 i; 3719 + u32 i; 3720 3720 Scsi_Cmnd *nscp; 3721 3721 gdth_ha_str *ha; 3722 - ulong flags; 3722 + unsigned long flags; 3723 3723 3724 3724 if(unlikely(list_empty(&gdth_instances))) { 3725 3725 gdth_timer_running = 0; ··· 3891 3891 { 3892 3892 gdth_ha_str *ha = shost_priv(scp->device->host); 3893 3893 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); 3894 - unchar b, t; 3895 - ulong flags; 3894 + u8 b, t; 3895 + unsigned long flags; 3896 3896 enum blk_eh_timer_return retval = BLK_EH_NOT_HANDLED; 3897 3897 3898 3898 TRACE(("%s() cmd 0x%x\n", scp->cmnd[0], __func__)); ··· 3924 3924 { 3925 3925 gdth_ha_str *ha = shost_priv(scp->device->host); 3926 3926 int i; 3927 - ulong flags; 3927 + unsigned long flags; 3928 3928 Scsi_Cmnd *cmnd; 3929 - unchar b; 3929 + u8 b; 3930 3930 3931 3931 TRACE2(("gdth_eh_bus_reset()\n")); 3932 3932 ··· 3974 3974 3975 3975 static int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip) 3976 3976 { 3977 - unchar b, t; 3977 + u8 b, t; 3978 3978 gdth_ha_str *ha = shost_priv(sdev->host); 3979 3979 struct scsi_device *sd; 3980 3980 unsigned capacity; ··· 4062 4062 { 4063 4063 gdth_ioctl_event evt; 4064 4064 gdth_ha_str *ha; 4065 - ulong flags; 4065 + unsigned long flags; 4066 4066 4067 4067 if (copy_from_user(&evt, arg, sizeof(gdth_ioctl_event))) 4068 4068 return -EFAULT; ··· 4098 4098 static int ioc_lockdrv(void __user *arg) 4099 4099 { 4100 4100 gdth_ioctl_lockdrv ldrv; 4101 - unchar i, j; 4102 - ulong flags; 4101 + u8 i, j; 4102 + unsigned long flags; 4103 4103 gdth_ha_str *ha; 4104 4104 4105 4105 if (copy_from_user(&ldrv, arg, sizeof(gdth_ioctl_lockdrv))) ··· 4165 4165 { 4166 4166 gdth_ioctl_general gen; 4167 4167 char *buf = NULL; 4168 - ulong64 paddr; 4168 + u64 paddr; 4169 4169 gdth_ha_str *ha; 4170 4170 int rval; 4171 4171 ··· 4194 4194 gen.command.u.cache64.DeviceNo = gen.command.u.cache.DeviceNo; 4195 4195 /* addresses */ 4196 4196 if (ha->cache_feat & SCATTER_GATHER) { 4197 - gen.command.u.cache64.DestAddr = (ulong64)-1; 4197 + gen.command.u.cache64.DestAddr = (u64)-1; 4198 4198 gen.command.u.cache64.sg_canz = 1; 4199 4199 gen.command.u.cache64.sg_lst[0].sg_ptr = paddr; 4200 4200 gen.command.u.cache64.sg_lst[0].sg_len = gen.data_len; ··· 4207 4207 if (ha->cache_feat & SCATTER_GATHER) { 4208 4208 gen.command.u.cache.DestAddr = 0xffffffff; 4209 4209 gen.command.u.cache.sg_canz = 1; 4210 - gen.command.u.cache.sg_lst[0].sg_ptr = (ulong32)paddr; 4210 + gen.command.u.cache.sg_lst[0].sg_ptr = (u32)paddr; 4211 4211 gen.command.u.cache.sg_lst[0].sg_len = gen.data_len; 4212 4212 gen.command.u.cache.sg_lst[1].sg_len = 0; 4213 4213 } else { ··· 4230 4230 gen.command.u.raw64.direction = gen.command.u.raw.direction; 4231 4231 /* addresses */ 4232 4232 if (ha->raw_feat & SCATTER_GATHER) { 4233 - gen.command.u.raw64.sdata = (ulong64)-1; 4233 + gen.command.u.raw64.sdata = (u64)-1; 4234 4234 gen.command.u.raw64.sg_ranz = 1; 4235 4235 gen.command.u.raw64.sg_lst[0].sg_ptr = paddr; 4236 4236 gen.command.u.raw64.sg_lst[0].sg_len = gen.data_len; ··· 4244 4244 if (ha->raw_feat & SCATTER_GATHER) { 4245 4245 gen.command.u.raw.sdata = 0xffffffff; 4246 4246 gen.command.u.raw.sg_ranz = 1; 4247 - gen.command.u.raw.sg_lst[0].sg_ptr = (ulong32)paddr; 4247 + gen.command.u.raw.sg_lst[0].sg_ptr = (u32)paddr; 4248 4248 gen.command.u.raw.sg_lst[0].sg_len = gen.data_len; 4249 4249 gen.command.u.raw.sg_lst[1].sg_len = 0; 4250 4250 } else { 4251 4251 gen.command.u.raw.sdata = paddr; 4252 4252 gen.command.u.raw.sg_ranz = 0; 4253 4253 } 4254 - gen.command.u.raw.sense_data = (ulong32)paddr + gen.data_len; 4254 + gen.command.u.raw.sense_data = (u32)paddr + gen.data_len; 4255 4255 } 4256 4256 } else { 4257 4257 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); ··· 4283 4283 gdth_ioctl_rescan *rsc; 4284 4284 gdth_cmd_str *cmd; 4285 4285 gdth_ha_str *ha; 4286 - unchar i; 4286 + u8 i; 4287 4287 int rc = -ENOMEM; 4288 4288 u32 cluster_type = 0; 4289 4289 ··· 4335 4335 { 4336 4336 gdth_ioctl_rescan *rsc; 4337 4337 gdth_cmd_str *cmd; 4338 - ushort i, status, hdr_cnt; 4339 - ulong32 info; 4338 + u16 i, status, hdr_cnt; 4339 + u32 info; 4340 4340 int cyls, hds, secs; 4341 4341 int rc = -ENOMEM; 4342 - ulong flags; 4342 + unsigned long flags; 4343 4343 gdth_ha_str *ha; 4344 4344 4345 4345 rsc = kmalloc(sizeof(*rsc), GFP_KERNEL); ··· 4367 4367 4368 4368 status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); 4369 4369 i = 0; 4370 - hdr_cnt = (status == S_OK ? (ushort)info : 0); 4370 + hdr_cnt = (status == S_OK ? (u16)info : 0); 4371 4371 } else { 4372 4372 i = rsc->hdr_no; 4373 4373 hdr_cnt = i + 1; ··· 4418 4418 status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); 4419 4419 4420 4420 spin_lock_irqsave(&ha->smp_lock, flags); 4421 - ha->hdr[i].devtype = (status == S_OK ? (ushort)info : 0); 4421 + ha->hdr[i].devtype = (status == S_OK ? (u16)info : 0); 4422 4422 spin_unlock_irqrestore(&ha->smp_lock, flags); 4423 4423 4424 4424 cmd->Service = CACHESERVICE; ··· 4432 4432 4433 4433 spin_lock_irqsave(&ha->smp_lock, flags); 4434 4434 ha->hdr[i].cluster_type = 4435 - ((status == S_OK && !shared_access) ? (ushort)info : 0); 4435 + ((status == S_OK && !shared_access) ? (u16)info : 0); 4436 4436 spin_unlock_irqrestore(&ha->smp_lock, flags); 4437 4437 rsc->hdr_list[i].cluster_type = ha->hdr[i].cluster_type; 4438 4438 ··· 4446 4446 status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); 4447 4447 4448 4448 spin_lock_irqsave(&ha->smp_lock, flags); 4449 - ha->hdr[i].rw_attribs = (status == S_OK ? (ushort)info : 0); 4449 + ha->hdr[i].rw_attribs = (status == S_OK ? (u16)info : 0); 4450 4450 spin_unlock_irqrestore(&ha->smp_lock, flags); 4451 4451 } 4452 4452 ··· 4466 4466 { 4467 4467 gdth_ha_str *ha; 4468 4468 Scsi_Cmnd *scp; 4469 - ulong flags; 4469 + unsigned long flags; 4470 4470 char cmnd[MAX_COMMAND_SIZE]; 4471 4471 void __user *argp = (void __user *)arg; 4472 4472 ··· 4495 4495 { 4496 4496 gdth_ioctl_osvers osv; 4497 4497 4498 - osv.version = (unchar)(LINUX_VERSION_CODE >> 16); 4499 - osv.subversion = (unchar)(LINUX_VERSION_CODE >> 8); 4500 - osv.revision = (ushort)(LINUX_VERSION_CODE & 0xff); 4498 + osv.version = (u8)(LINUX_VERSION_CODE >> 16); 4499 + osv.subversion = (u8)(LINUX_VERSION_CODE >> 8); 4500 + osv.revision = (u16)(LINUX_VERSION_CODE & 0xff); 4501 4501 if (copy_to_user(argp, &osv, sizeof(gdth_ioctl_osvers))) 4502 4502 return -EFAULT; 4503 4503 break; ··· 4512 4512 return -EFAULT; 4513 4513 4514 4514 if (ha->type == GDT_ISA || ha->type == GDT_EISA) { 4515 - ctrt.type = (unchar)((ha->stype>>20) - 0x10); 4515 + ctrt.type = (u8)((ha->stype>>20) - 0x10); 4516 4516 } else { 4517 4517 if (ha->type != GDT_PCIMPR) { 4518 - ctrt.type = (unchar)((ha->stype<<4) + 6); 4518 + ctrt.type = (u8)((ha->stype<<4) + 6); 4519 4519 } else { 4520 4520 ctrt.type = 4521 4521 (ha->oem_id == OEM_ID_INTEL ? 0xfd : 0xfe); ··· 4546 4546 case GDTIOCTL_LOCKCHN: 4547 4547 { 4548 4548 gdth_ioctl_lockchn lchn; 4549 - unchar i, j; 4549 + u8 i, j; 4550 4550 4551 4551 if (copy_from_user(&lchn, argp, sizeof(gdth_ioctl_lockchn)) || 4552 4552 (NULL == (ha = gdth_find_ha(lchn.ionode)))) ··· 4670 4670 }; 4671 4671 4672 4672 #ifdef CONFIG_ISA 4673 - static int __init gdth_isa_probe_one(ulong32 isa_bios) 4673 + static int __init gdth_isa_probe_one(u32 isa_bios) 4674 4674 { 4675 4675 struct Scsi_Host *shp; 4676 4676 gdth_ha_str *ha; ··· 4802 4802 #endif /* CONFIG_ISA */ 4803 4803 4804 4804 #ifdef CONFIG_EISA 4805 - static int __init gdth_eisa_probe_one(ushort eisa_slot) 4805 + static int __init gdth_eisa_probe_one(u16 eisa_slot) 4806 4806 { 4807 4807 struct Scsi_Host *shp; 4808 4808 gdth_ha_str *ha; ··· 5120 5120 scsi_host_put(shp); 5121 5121 } 5122 5122 5123 - static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) 5123 + static int gdth_halt(struct notifier_block *nb, unsigned long event, void *buf) 5124 5124 { 5125 5125 gdth_ha_str *ha; 5126 5126 ··· 5158 5158 if (probe_eisa_isa) { 5159 5159 /* scanning for controllers, at first: ISA controller */ 5160 5160 #ifdef CONFIG_ISA 5161 - ulong32 isa_bios; 5161 + u32 isa_bios; 5162 5162 for (isa_bios = 0xc8000UL; isa_bios <= 0xd8000UL; 5163 5163 isa_bios += 0x8000UL) 5164 5164 gdth_isa_probe_one(isa_bios); 5165 5165 #endif 5166 5166 #ifdef CONFIG_EISA 5167 5167 { 5168 - ushort eisa_slot; 5168 + u16 eisa_slot; 5169 5169 for (eisa_slot = 0x1000; eisa_slot <= 0x8000; 5170 5170 eisa_slot += 0x1000) 5171 5171 gdth_eisa_probe_one(eisa_slot);
+472 -472
drivers/scsi/gdth.h
··· 321 321 322 322 /* screenservice message */ 323 323 typedef struct { 324 - ulong32 msg_handle; /* message handle */ 325 - ulong32 msg_len; /* size of message */ 326 - ulong32 msg_alen; /* answer length */ 327 - unchar msg_answer; /* answer flag */ 328 - unchar msg_ext; /* more messages */ 329 - unchar msg_reserved[2]; 324 + u32 msg_handle; /* message handle */ 325 + u32 msg_len; /* size of message */ 326 + u32 msg_alen; /* answer length */ 327 + u8 msg_answer; /* answer flag */ 328 + u8 msg_ext; /* more messages */ 329 + u8 msg_reserved[2]; 330 330 char msg_text[MSGLEN+2]; /* the message text */ 331 - } PACKED gdth_msg_str; 331 + } __attribute__((packed)) gdth_msg_str; 332 332 333 333 334 334 /* IOCTL data structures */ 335 335 336 336 /* Status coalescing buffer for returning multiple requests per interrupt */ 337 337 typedef struct { 338 - ulong32 status; 339 - ulong32 ext_status; 340 - ulong32 info0; 341 - ulong32 info1; 342 - } PACKED gdth_coal_status; 338 + u32 status; 339 + u32 ext_status; 340 + u32 info0; 341 + u32 info1; 342 + } __attribute__((packed)) gdth_coal_status; 343 343 344 344 /* performance mode data structure */ 345 345 typedef struct { 346 - ulong32 version; /* The version of this IOCTL structure. */ 347 - ulong32 st_mode; /* 0=dis., 1=st_buf_addr1 valid, 2=both */ 348 - ulong32 st_buff_addr1; /* physical address of status buffer 1 */ 349 - ulong32 st_buff_u_addr1; /* reserved for 64 bit addressing */ 350 - ulong32 st_buff_indx1; /* reserved command idx. for this buffer */ 351 - ulong32 st_buff_addr2; /* physical address of status buffer 1 */ 352 - ulong32 st_buff_u_addr2; /* reserved for 64 bit addressing */ 353 - ulong32 st_buff_indx2; /* reserved command idx. for this buffer */ 354 - ulong32 st_buff_size; /* size of each buffer in bytes */ 355 - ulong32 cmd_mode; /* 0 = mode disabled, 1 = cmd_buff_addr1 */ 356 - ulong32 cmd_buff_addr1; /* physical address of cmd buffer 1 */ 357 - ulong32 cmd_buff_u_addr1; /* reserved for 64 bit addressing */ 358 - ulong32 cmd_buff_indx1; /* cmd buf addr1 unique identifier */ 359 - ulong32 cmd_buff_addr2; /* physical address of cmd buffer 1 */ 360 - ulong32 cmd_buff_u_addr2; /* reserved for 64 bit addressing */ 361 - ulong32 cmd_buff_indx2; /* cmd buf addr1 unique identifier */ 362 - ulong32 cmd_buff_size; /* size of each cmd bufer in bytes */ 363 - ulong32 reserved1; 364 - ulong32 reserved2; 365 - } PACKED gdth_perf_modes; 346 + u32 version; /* The version of this IOCTL structure. */ 347 + u32 st_mode; /* 0=dis., 1=st_buf_addr1 valid, 2=both */ 348 + u32 st_buff_addr1; /* physical address of status buffer 1 */ 349 + u32 st_buff_u_addr1; /* reserved for 64 bit addressing */ 350 + u32 st_buff_indx1; /* reserved command idx. for this buffer */ 351 + u32 st_buff_addr2; /* physical address of status buffer 1 */ 352 + u32 st_buff_u_addr2; /* reserved for 64 bit addressing */ 353 + u32 st_buff_indx2; /* reserved command idx. for this buffer */ 354 + u32 st_buff_size; /* size of each buffer in bytes */ 355 + u32 cmd_mode; /* 0 = mode disabled, 1 = cmd_buff_addr1 */ 356 + u32 cmd_buff_addr1; /* physical address of cmd buffer 1 */ 357 + u32 cmd_buff_u_addr1; /* reserved for 64 bit addressing */ 358 + u32 cmd_buff_indx1; /* cmd buf addr1 unique identifier */ 359 + u32 cmd_buff_addr2; /* physical address of cmd buffer 1 */ 360 + u32 cmd_buff_u_addr2; /* reserved for 64 bit addressing */ 361 + u32 cmd_buff_indx2; /* cmd buf addr1 unique identifier */ 362 + u32 cmd_buff_size; /* size of each cmd bufer in bytes */ 363 + u32 reserved1; 364 + u32 reserved2; 365 + } __attribute__((packed)) gdth_perf_modes; 366 366 367 367 /* SCSI drive info */ 368 368 typedef struct { 369 - unchar vendor[8]; /* vendor string */ 370 - unchar product[16]; /* product string */ 371 - unchar revision[4]; /* revision */ 372 - ulong32 sy_rate; /* current rate for sync. tr. */ 373 - ulong32 sy_max_rate; /* max. rate for sync. tr. */ 374 - ulong32 no_ldrive; /* belongs to this log. drv.*/ 375 - ulong32 blkcnt; /* number of blocks */ 376 - ushort blksize; /* size of block in bytes */ 377 - unchar available; /* flag: access is available */ 378 - unchar init; /* medium is initialized */ 379 - unchar devtype; /* SCSI devicetype */ 380 - unchar rm_medium; /* medium is removable */ 381 - unchar wp_medium; /* medium is write protected */ 382 - unchar ansi; /* SCSI I/II or III? */ 383 - unchar protocol; /* same as ansi */ 384 - unchar sync; /* flag: sync. transfer enab. */ 385 - unchar disc; /* flag: disconnect enabled */ 386 - unchar queueing; /* flag: command queing enab. */ 387 - unchar cached; /* flag: caching enabled */ 388 - unchar target_id; /* target ID of device */ 389 - unchar lun; /* LUN id of device */ 390 - unchar orphan; /* flag: drive fragment */ 391 - ulong32 last_error; /* sense key or drive state */ 392 - ulong32 last_result; /* result of last command */ 393 - ulong32 check_errors; /* err. in last surface check */ 394 - unchar percent; /* progress for surface check */ 395 - unchar last_check; /* IOCTRL operation */ 396 - unchar res[2]; 397 - ulong32 flags; /* from 1.19/2.19: raw reserv.*/ 398 - unchar multi_bus; /* multi bus dev? (fibre ch.) */ 399 - unchar mb_status; /* status: available? */ 400 - unchar res2[2]; 401 - unchar mb_alt_status; /* status on second bus */ 402 - unchar mb_alt_bid; /* number of second bus */ 403 - unchar mb_alt_tid; /* target id on second bus */ 404 - unchar res3; 405 - unchar fc_flag; /* from 1.22/2.22: info valid?*/ 406 - unchar res4; 407 - ushort fc_frame_size; /* frame size (bytes) */ 369 + u8 vendor[8]; /* vendor string */ 370 + u8 product[16]; /* product string */ 371 + u8 revision[4]; /* revision */ 372 + u32 sy_rate; /* current rate for sync. tr. */ 373 + u32 sy_max_rate; /* max. rate for sync. tr. */ 374 + u32 no_ldrive; /* belongs to this log. drv.*/ 375 + u32 blkcnt; /* number of blocks */ 376 + u16 blksize; /* size of block in bytes */ 377 + u8 available; /* flag: access is available */ 378 + u8 init; /* medium is initialized */ 379 + u8 devtype; /* SCSI devicetype */ 380 + u8 rm_medium; /* medium is removable */ 381 + u8 wp_medium; /* medium is write protected */ 382 + u8 ansi; /* SCSI I/II or III? */ 383 + u8 protocol; /* same as ansi */ 384 + u8 sync; /* flag: sync. transfer enab. */ 385 + u8 disc; /* flag: disconnect enabled */ 386 + u8 queueing; /* flag: command queing enab. */ 387 + u8 cached; /* flag: caching enabled */ 388 + u8 target_id; /* target ID of device */ 389 + u8 lun; /* LUN id of device */ 390 + u8 orphan; /* flag: drive fragment */ 391 + u32 last_error; /* sense key or drive state */ 392 + u32 last_result; /* result of last command */ 393 + u32 check_errors; /* err. in last surface check */ 394 + u8 percent; /* progress for surface check */ 395 + u8 last_check; /* IOCTRL operation */ 396 + u8 res[2]; 397 + u32 flags; /* from 1.19/2.19: raw reserv.*/ 398 + u8 multi_bus; /* multi bus dev? (fibre ch.) */ 399 + u8 mb_status; /* status: available? */ 400 + u8 res2[2]; 401 + u8 mb_alt_status; /* status on second bus */ 402 + u8 mb_alt_bid; /* number of second bus */ 403 + u8 mb_alt_tid; /* target id on second bus */ 404 + u8 res3; 405 + u8 fc_flag; /* from 1.22/2.22: info valid?*/ 406 + u8 res4; 407 + u16 fc_frame_size; /* frame size (bytes) */ 408 408 char wwn[8]; /* world wide name */ 409 - } PACKED gdth_diskinfo_str; 409 + } __attribute__((packed)) gdth_diskinfo_str; 410 410 411 411 /* get SCSI channel count */ 412 412 typedef struct { 413 - ulong32 channel_no; /* number of channel */ 414 - ulong32 drive_cnt; /* drive count */ 415 - unchar siop_id; /* SCSI processor ID */ 416 - unchar siop_state; /* SCSI processor state */ 417 - } PACKED gdth_getch_str; 413 + u32 channel_no; /* number of channel */ 414 + u32 drive_cnt; /* drive count */ 415 + u8 siop_id; /* SCSI processor ID */ 416 + u8 siop_state; /* SCSI processor state */ 417 + } __attribute__((packed)) gdth_getch_str; 418 418 419 419 /* get SCSI drive numbers */ 420 420 typedef struct { 421 - ulong32 sc_no; /* SCSI channel */ 422 - ulong32 sc_cnt; /* sc_list[] elements */ 423 - ulong32 sc_list[MAXID]; /* minor device numbers */ 424 - } PACKED gdth_drlist_str; 421 + u32 sc_no; /* SCSI channel */ 422 + u32 sc_cnt; /* sc_list[] elements */ 423 + u32 sc_list[MAXID]; /* minor device numbers */ 424 + } __attribute__((packed)) gdth_drlist_str; 425 425 426 426 /* get grown/primary defect count */ 427 427 typedef struct { 428 - unchar sddc_type; /* 0x08: grown, 0x10: prim. */ 429 - unchar sddc_format; /* list entry format */ 430 - unchar sddc_len; /* list entry length */ 431 - unchar sddc_res; 432 - ulong32 sddc_cnt; /* entry count */ 433 - } PACKED gdth_defcnt_str; 428 + u8 sddc_type; /* 0x08: grown, 0x10: prim. */ 429 + u8 sddc_format; /* list entry format */ 430 + u8 sddc_len; /* list entry length */ 431 + u8 sddc_res; 432 + u32 sddc_cnt; /* entry count */ 433 + } __attribute__((packed)) gdth_defcnt_str; 434 434 435 435 /* disk statistics */ 436 436 typedef struct { 437 - ulong32 bid; /* SCSI channel */ 438 - ulong32 first; /* first SCSI disk */ 439 - ulong32 entries; /* number of elements */ 440 - ulong32 count; /* (R) number of init. el. */ 441 - ulong32 mon_time; /* time stamp */ 437 + u32 bid; /* SCSI channel */ 438 + u32 first; /* first SCSI disk */ 439 + u32 entries; /* number of elements */ 440 + u32 count; /* (R) number of init. el. */ 441 + u32 mon_time; /* time stamp */ 442 442 struct { 443 - unchar tid; /* target ID */ 444 - unchar lun; /* LUN */ 445 - unchar res[2]; 446 - ulong32 blk_size; /* block size in bytes */ 447 - ulong32 rd_count; /* bytes read */ 448 - ulong32 wr_count; /* bytes written */ 449 - ulong32 rd_blk_count; /* blocks read */ 450 - ulong32 wr_blk_count; /* blocks written */ 451 - ulong32 retries; /* retries */ 452 - ulong32 reassigns; /* reassigns */ 453 - } PACKED list[1]; 454 - } PACKED gdth_dskstat_str; 443 + u8 tid; /* target ID */ 444 + u8 lun; /* LUN */ 445 + u8 res[2]; 446 + u32 blk_size; /* block size in bytes */ 447 + u32 rd_count; /* bytes read */ 448 + u32 wr_count; /* bytes written */ 449 + u32 rd_blk_count; /* blocks read */ 450 + u32 wr_blk_count; /* blocks written */ 451 + u32 retries; /* retries */ 452 + u32 reassigns; /* reassigns */ 453 + } __attribute__((packed)) list[1]; 454 + } __attribute__((packed)) gdth_dskstat_str; 455 455 456 456 /* IO channel header */ 457 457 typedef struct { 458 - ulong32 version; /* version (-1UL: newest) */ 459 - unchar list_entries; /* list entry count */ 460 - unchar first_chan; /* first channel number */ 461 - unchar last_chan; /* last channel number */ 462 - unchar chan_count; /* (R) channel count */ 463 - ulong32 list_offset; /* offset of list[0] */ 464 - } PACKED gdth_iochan_header; 458 + u32 version; /* version (-1UL: newest) */ 459 + u8 list_entries; /* list entry count */ 460 + u8 first_chan; /* first channel number */ 461 + u8 last_chan; /* last channel number */ 462 + u8 chan_count; /* (R) channel count */ 463 + u32 list_offset; /* offset of list[0] */ 464 + } __attribute__((packed)) gdth_iochan_header; 465 465 466 466 /* get IO channel description */ 467 467 typedef struct { 468 468 gdth_iochan_header hdr; 469 469 struct { 470 - ulong32 address; /* channel address */ 471 - unchar type; /* type (SCSI, FCAL) */ 472 - unchar local_no; /* local number */ 473 - ushort features; /* channel features */ 474 - } PACKED list[MAXBUS]; 475 - } PACKED gdth_iochan_str; 470 + u32 address; /* channel address */ 471 + u8 type; /* type (SCSI, FCAL) */ 472 + u8 local_no; /* local number */ 473 + u16 features; /* channel features */ 474 + } __attribute__((packed)) list[MAXBUS]; 475 + } __attribute__((packed)) gdth_iochan_str; 476 476 477 477 /* get raw IO channel description */ 478 478 typedef struct { 479 479 gdth_iochan_header hdr; 480 480 struct { 481 - unchar proc_id; /* processor id */ 482 - unchar proc_defect; /* defect ? */ 483 - unchar reserved[2]; 484 - } PACKED list[MAXBUS]; 485 - } PACKED gdth_raw_iochan_str; 481 + u8 proc_id; /* processor id */ 482 + u8 proc_defect; /* defect ? */ 483 + u8 reserved[2]; 484 + } __attribute__((packed)) list[MAXBUS]; 485 + } __attribute__((packed)) gdth_raw_iochan_str; 486 486 487 487 /* array drive component */ 488 488 typedef struct { 489 - ulong32 al_controller; /* controller ID */ 490 - unchar al_cache_drive; /* cache drive number */ 491 - unchar al_status; /* cache drive state */ 492 - unchar al_res[2]; 493 - } PACKED gdth_arraycomp_str; 489 + u32 al_controller; /* controller ID */ 490 + u8 al_cache_drive; /* cache drive number */ 491 + u8 al_status; /* cache drive state */ 492 + u8 al_res[2]; 493 + } __attribute__((packed)) gdth_arraycomp_str; 494 494 495 495 /* array drive information */ 496 496 typedef struct { 497 - unchar ai_type; /* array type (RAID0,4,5) */ 498 - unchar ai_cache_drive_cnt; /* active cachedrives */ 499 - unchar ai_state; /* array drive state */ 500 - unchar ai_master_cd; /* master cachedrive */ 501 - ulong32 ai_master_controller; /* ID of master controller */ 502 - ulong32 ai_size; /* user capacity [sectors] */ 503 - ulong32 ai_striping_size; /* striping size [sectors] */ 504 - ulong32 ai_secsize; /* sector size [bytes] */ 505 - ulong32 ai_err_info; /* failed cache drive */ 506 - unchar ai_name[8]; /* name of the array drive */ 507 - unchar ai_controller_cnt; /* number of controllers */ 508 - unchar ai_removable; /* flag: removable */ 509 - unchar ai_write_protected; /* flag: write protected */ 510 - unchar ai_devtype; /* type: always direct access */ 497 + u8 ai_type; /* array type (RAID0,4,5) */ 498 + u8 ai_cache_drive_cnt; /* active cachedrives */ 499 + u8 ai_state; /* array drive state */ 500 + u8 ai_master_cd; /* master cachedrive */ 501 + u32 ai_master_controller; /* ID of master controller */ 502 + u32 ai_size; /* user capacity [sectors] */ 503 + u32 ai_striping_size; /* striping size [sectors] */ 504 + u32 ai_secsize; /* sector size [bytes] */ 505 + u32 ai_err_info; /* failed cache drive */ 506 + u8 ai_name[8]; /* name of the array drive */ 507 + u8 ai_controller_cnt; /* number of controllers */ 508 + u8 ai_removable; /* flag: removable */ 509 + u8 ai_write_protected; /* flag: write protected */ 510 + u8 ai_devtype; /* type: always direct access */ 511 511 gdth_arraycomp_str ai_drives[35]; /* drive components: */ 512 - unchar ai_drive_entries; /* number of drive components */ 513 - unchar ai_protected; /* protection flag */ 514 - unchar ai_verify_state; /* state of a parity verify */ 515 - unchar ai_ext_state; /* extended array drive state */ 516 - unchar ai_expand_state; /* array expand state (>=2.18)*/ 517 - unchar ai_reserved[3]; 518 - } PACKED gdth_arrayinf_str; 512 + u8 ai_drive_entries; /* number of drive components */ 513 + u8 ai_protected; /* protection flag */ 514 + u8 ai_verify_state; /* state of a parity verify */ 515 + u8 ai_ext_state; /* extended array drive state */ 516 + u8 ai_expand_state; /* array expand state (>=2.18)*/ 517 + u8 ai_reserved[3]; 518 + } __attribute__((packed)) gdth_arrayinf_str; 519 519 520 520 /* get array drive list */ 521 521 typedef struct { 522 - ulong32 controller_no; /* controller no. */ 523 - unchar cd_handle; /* master cachedrive */ 524 - unchar is_arrayd; /* Flag: is array drive? */ 525 - unchar is_master; /* Flag: is array master? */ 526 - unchar is_parity; /* Flag: is parity drive? */ 527 - unchar is_hotfix; /* Flag: is hotfix drive? */ 528 - unchar res[3]; 529 - } PACKED gdth_alist_str; 522 + u32 controller_no; /* controller no. */ 523 + u8 cd_handle; /* master cachedrive */ 524 + u8 is_arrayd; /* Flag: is array drive? */ 525 + u8 is_master; /* Flag: is array master? */ 526 + u8 is_parity; /* Flag: is parity drive? */ 527 + u8 is_hotfix; /* Flag: is hotfix drive? */ 528 + u8 res[3]; 529 + } __attribute__((packed)) gdth_alist_str; 530 530 531 531 typedef struct { 532 - ulong32 entries_avail; /* allocated entries */ 533 - ulong32 entries_init; /* returned entries */ 534 - ulong32 first_entry; /* first entry number */ 535 - ulong32 list_offset; /* offset of following list */ 532 + u32 entries_avail; /* allocated entries */ 533 + u32 entries_init; /* returned entries */ 534 + u32 first_entry; /* first entry number */ 535 + u32 list_offset; /* offset of following list */ 536 536 gdth_alist_str list[1]; /* list */ 537 - } PACKED gdth_arcdl_str; 537 + } __attribute__((packed)) gdth_arcdl_str; 538 538 539 539 /* cache info/config IOCTL */ 540 540 typedef struct { 541 - ulong32 version; /* firmware version */ 542 - ushort state; /* cache state (on/off) */ 543 - ushort strategy; /* cache strategy */ 544 - ushort write_back; /* write back state (on/off) */ 545 - ushort block_size; /* cache block size */ 546 - } PACKED gdth_cpar_str; 541 + u32 version; /* firmware version */ 542 + u16 state; /* cache state (on/off) */ 543 + u16 strategy; /* cache strategy */ 544 + u16 write_back; /* write back state (on/off) */ 545 + u16 block_size; /* cache block size */ 546 + } __attribute__((packed)) gdth_cpar_str; 547 547 548 548 typedef struct { 549 - ulong32 csize; /* cache size */ 550 - ulong32 read_cnt; /* read/write counter */ 551 - ulong32 write_cnt; 552 - ulong32 tr_hits; /* hits */ 553 - ulong32 sec_hits; 554 - ulong32 sec_miss; /* misses */ 555 - } PACKED gdth_cstat_str; 549 + u32 csize; /* cache size */ 550 + u32 read_cnt; /* read/write counter */ 551 + u32 write_cnt; 552 + u32 tr_hits; /* hits */ 553 + u32 sec_hits; 554 + u32 sec_miss; /* misses */ 555 + } __attribute__((packed)) gdth_cstat_str; 556 556 557 557 typedef struct { 558 558 gdth_cpar_str cpar; 559 559 gdth_cstat_str cstat; 560 - } PACKED gdth_cinfo_str; 560 + } __attribute__((packed)) gdth_cinfo_str; 561 561 562 562 /* cache drive info */ 563 563 typedef struct { 564 - unchar cd_name[8]; /* cache drive name */ 565 - ulong32 cd_devtype; /* SCSI devicetype */ 566 - ulong32 cd_ldcnt; /* number of log. drives */ 567 - ulong32 cd_last_error; /* last error */ 568 - unchar cd_initialized; /* drive is initialized */ 569 - unchar cd_removable; /* media is removable */ 570 - unchar cd_write_protected; /* write protected */ 571 - unchar cd_flags; /* Pool Hot Fix? */ 572 - ulong32 ld_blkcnt; /* number of blocks */ 573 - ulong32 ld_blksize; /* blocksize */ 574 - ulong32 ld_dcnt; /* number of disks */ 575 - ulong32 ld_slave; /* log. drive index */ 576 - ulong32 ld_dtype; /* type of logical drive */ 577 - ulong32 ld_last_error; /* last error */ 578 - unchar ld_name[8]; /* log. drive name */ 579 - unchar ld_error; /* error */ 580 - } PACKED gdth_cdrinfo_str; 564 + u8 cd_name[8]; /* cache drive name */ 565 + u32 cd_devtype; /* SCSI devicetype */ 566 + u32 cd_ldcnt; /* number of log. drives */ 567 + u32 cd_last_error; /* last error */ 568 + u8 cd_initialized; /* drive is initialized */ 569 + u8 cd_removable; /* media is removable */ 570 + u8 cd_write_protected; /* write protected */ 571 + u8 cd_flags; /* Pool Hot Fix? */ 572 + u32 ld_blkcnt; /* number of blocks */ 573 + u32 ld_blksize; /* blocksize */ 574 + u32 ld_dcnt; /* number of disks */ 575 + u32 ld_slave; /* log. drive index */ 576 + u32 ld_dtype; /* type of logical drive */ 577 + u32 ld_last_error; /* last error */ 578 + u8 ld_name[8]; /* log. drive name */ 579 + u8 ld_error; /* error */ 580 + } __attribute__((packed)) gdth_cdrinfo_str; 581 581 582 582 /* OEM string */ 583 583 typedef struct { 584 - ulong32 ctl_version; 585 - ulong32 file_major_version; 586 - ulong32 file_minor_version; 587 - ulong32 buffer_size; 588 - ulong32 cpy_count; 589 - ulong32 ext_error; 590 - ulong32 oem_id; 591 - ulong32 board_id; 592 - } PACKED gdth_oem_str_params; 584 + u32 ctl_version; 585 + u32 file_major_version; 586 + u32 file_minor_version; 587 + u32 buffer_size; 588 + u32 cpy_count; 589 + u32 ext_error; 590 + u32 oem_id; 591 + u32 board_id; 592 + } __attribute__((packed)) gdth_oem_str_params; 593 593 594 594 typedef struct { 595 - unchar product_0_1_name[16]; 596 - unchar product_4_5_name[16]; 597 - unchar product_cluster_name[16]; 598 - unchar product_reserved[16]; 599 - unchar scsi_cluster_target_vendor_id[16]; 600 - unchar cluster_raid_fw_name[16]; 601 - unchar oem_brand_name[16]; 602 - unchar oem_raid_type[16]; 603 - unchar bios_type[13]; 604 - unchar bios_title[50]; 605 - unchar oem_company_name[37]; 606 - ulong32 pci_id_1; 607 - ulong32 pci_id_2; 608 - unchar validation_status[80]; 609 - unchar reserved_1[4]; 610 - unchar scsi_host_drive_inquiry_vendor_id[16]; 611 - unchar library_file_template[16]; 612 - unchar reserved_2[16]; 613 - unchar tool_name_1[32]; 614 - unchar tool_name_2[32]; 615 - unchar tool_name_3[32]; 616 - unchar oem_contact_1[84]; 617 - unchar oem_contact_2[84]; 618 - unchar oem_contact_3[84]; 619 - } PACKED gdth_oem_str; 595 + u8 product_0_1_name[16]; 596 + u8 product_4_5_name[16]; 597 + u8 product_cluster_name[16]; 598 + u8 product_reserved[16]; 599 + u8 scsi_cluster_target_vendor_id[16]; 600 + u8 cluster_raid_fw_name[16]; 601 + u8 oem_brand_name[16]; 602 + u8 oem_raid_type[16]; 603 + u8 bios_type[13]; 604 + u8 bios_title[50]; 605 + u8 oem_company_name[37]; 606 + u32 pci_id_1; 607 + u32 pci_id_2; 608 + u8 validation_status[80]; 609 + u8 reserved_1[4]; 610 + u8 scsi_host_drive_inquiry_vendor_id[16]; 611 + u8 library_file_template[16]; 612 + u8 reserved_2[16]; 613 + u8 tool_name_1[32]; 614 + u8 tool_name_2[32]; 615 + u8 tool_name_3[32]; 616 + u8 oem_contact_1[84]; 617 + u8 oem_contact_2[84]; 618 + u8 oem_contact_3[84]; 619 + } __attribute__((packed)) gdth_oem_str; 620 620 621 621 typedef struct { 622 622 gdth_oem_str_params params; 623 623 gdth_oem_str text; 624 - } PACKED gdth_oem_str_ioctl; 624 + } __attribute__((packed)) gdth_oem_str_ioctl; 625 625 626 626 /* board features */ 627 627 typedef struct { 628 - unchar chaining; /* Chaining supported */ 629 - unchar striping; /* Striping (RAID-0) supp. */ 630 - unchar mirroring; /* Mirroring (RAID-1) supp. */ 631 - unchar raid; /* RAID-4/5/10 supported */ 632 - } PACKED gdth_bfeat_str; 628 + u8 chaining; /* Chaining supported */ 629 + u8 striping; /* Striping (RAID-0) supp. */ 630 + u8 mirroring; /* Mirroring (RAID-1) supp. */ 631 + u8 raid; /* RAID-4/5/10 supported */ 632 + } __attribute__((packed)) gdth_bfeat_str; 633 633 634 634 /* board info IOCTL */ 635 635 typedef struct { 636 - ulong32 ser_no; /* serial no. */ 637 - unchar oem_id[2]; /* OEM ID */ 638 - ushort ep_flags; /* eprom flags */ 639 - ulong32 proc_id; /* processor ID */ 640 - ulong32 memsize; /* memory size (bytes) */ 641 - unchar mem_banks; /* memory banks */ 642 - unchar chan_type; /* channel type */ 643 - unchar chan_count; /* channel count */ 644 - unchar rdongle_pres; /* dongle present? */ 645 - ulong32 epr_fw_ver; /* (eprom) firmware version */ 646 - ulong32 upd_fw_ver; /* (update) firmware version */ 647 - ulong32 upd_revision; /* update revision */ 636 + u32 ser_no; /* serial no. */ 637 + u8 oem_id[2]; /* OEM ID */ 638 + u16 ep_flags; /* eprom flags */ 639 + u32 proc_id; /* processor ID */ 640 + u32 memsize; /* memory size (bytes) */ 641 + u8 mem_banks; /* memory banks */ 642 + u8 chan_type; /* channel type */ 643 + u8 chan_count; /* channel count */ 644 + u8 rdongle_pres; /* dongle present? */ 645 + u32 epr_fw_ver; /* (eprom) firmware version */ 646 + u32 upd_fw_ver; /* (update) firmware version */ 647 + u32 upd_revision; /* update revision */ 648 648 char type_string[16]; /* controller name */ 649 649 char raid_string[16]; /* RAID firmware name */ 650 - unchar update_pres; /* update present? */ 651 - unchar xor_pres; /* XOR engine present? */ 652 - unchar prom_type; /* ROM type (eprom/flash) */ 653 - unchar prom_count; /* number of ROM devices */ 654 - ulong32 dup_pres; /* duplexing module present? */ 655 - ulong32 chan_pres; /* number of expansion chn. */ 656 - ulong32 mem_pres; /* memory expansion inst. ? */ 657 - unchar ft_bus_system; /* fault bus supported? */ 658 - unchar subtype_valid; /* board_subtype valid? */ 659 - unchar board_subtype; /* subtype/hardware level */ 660 - unchar ramparity_pres; /* RAM parity check hardware? */ 661 - } PACKED gdth_binfo_str; 650 + u8 update_pres; /* update present? */ 651 + u8 xor_pres; /* XOR engine present? */ 652 + u8 prom_type; /* ROM type (eprom/flash) */ 653 + u8 prom_count; /* number of ROM devices */ 654 + u32 dup_pres; /* duplexing module present? */ 655 + u32 chan_pres; /* number of expansion chn. */ 656 + u32 mem_pres; /* memory expansion inst. ? */ 657 + u8 ft_bus_system; /* fault bus supported? */ 658 + u8 subtype_valid; /* board_subtype valid? */ 659 + u8 board_subtype; /* subtype/hardware level */ 660 + u8 ramparity_pres; /* RAM parity check hardware? */ 661 + } __attribute__((packed)) gdth_binfo_str; 662 662 663 663 /* get host drive info */ 664 664 typedef struct { 665 665 char name[8]; /* host drive name */ 666 - ulong32 size; /* size (sectors) */ 667 - unchar host_drive; /* host drive number */ 668 - unchar log_drive; /* log. drive (master) */ 669 - unchar reserved; 670 - unchar rw_attribs; /* r/w attribs */ 671 - ulong32 start_sec; /* start sector */ 672 - } PACKED gdth_hentry_str; 666 + u32 size; /* size (sectors) */ 667 + u8 host_drive; /* host drive number */ 668 + u8 log_drive; /* log. drive (master) */ 669 + u8 reserved; 670 + u8 rw_attribs; /* r/w attribs */ 671 + u32 start_sec; /* start sector */ 672 + } __attribute__((packed)) gdth_hentry_str; 673 673 674 674 typedef struct { 675 - ulong32 entries; /* entry count */ 676 - ulong32 offset; /* offset of entries */ 677 - unchar secs_p_head; /* sectors/head */ 678 - unchar heads_p_cyl; /* heads/cylinder */ 679 - unchar reserved; 680 - unchar clust_drvtype; /* cluster drive type */ 681 - ulong32 location; /* controller number */ 675 + u32 entries; /* entry count */ 676 + u32 offset; /* offset of entries */ 677 + u8 secs_p_head; /* sectors/head */ 678 + u8 heads_p_cyl; /* heads/cylinder */ 679 + u8 reserved; 680 + u8 clust_drvtype; /* cluster drive type */ 681 + u32 location; /* controller number */ 682 682 gdth_hentry_str entry[MAX_HDRIVES]; /* entries */ 683 - } PACKED gdth_hget_str; 683 + } __attribute__((packed)) gdth_hget_str; 684 684 685 685 686 686 /* DPRAM structures */ 687 687 688 688 /* interface area ISA/PCI */ 689 689 typedef struct { 690 - unchar S_Cmd_Indx; /* special command */ 691 - unchar volatile S_Status; /* status special command */ 692 - ushort reserved1; 693 - ulong32 S_Info[4]; /* add. info special command */ 694 - unchar volatile Sema0; /* command semaphore */ 695 - unchar reserved2[3]; 696 - unchar Cmd_Index; /* command number */ 697 - unchar reserved3[3]; 698 - ushort volatile Status; /* command status */ 699 - ushort Service; /* service(for async.events) */ 700 - ulong32 Info[2]; /* additional info */ 690 + u8 S_Cmd_Indx; /* special command */ 691 + u8 volatile S_Status; /* status special command */ 692 + u16 reserved1; 693 + u32 S_Info[4]; /* add. info special command */ 694 + u8 volatile Sema0; /* command semaphore */ 695 + u8 reserved2[3]; 696 + u8 Cmd_Index; /* command number */ 697 + u8 reserved3[3]; 698 + u16 volatile Status; /* command status */ 699 + u16 Service; /* service(for async.events) */ 700 + u32 Info[2]; /* additional info */ 701 701 struct { 702 - ushort offset; /* command offs. in the DPRAM*/ 703 - ushort serv_id; /* service */ 704 - } PACKED comm_queue[MAXOFFSETS]; /* command queue */ 705 - ulong32 bios_reserved[2]; 706 - unchar gdt_dpr_cmd[1]; /* commands */ 707 - } PACKED gdt_dpr_if; 702 + u16 offset; /* command offs. in the DPRAM*/ 703 + u16 serv_id; /* service */ 704 + } __attribute__((packed)) comm_queue[MAXOFFSETS]; /* command queue */ 705 + u32 bios_reserved[2]; 706 + u8 gdt_dpr_cmd[1]; /* commands */ 707 + } __attribute__((packed)) gdt_dpr_if; 708 708 709 709 /* SRAM structure PCI controllers */ 710 710 typedef struct { 711 - ulong32 magic; /* controller ID from BIOS */ 712 - ushort need_deinit; /* switch betw. BIOS/driver */ 713 - unchar switch_support; /* see need_deinit */ 714 - unchar padding[9]; 715 - unchar os_used[16]; /* OS code per service */ 716 - unchar unused[28]; 717 - unchar fw_magic; /* contr. ID from firmware */ 718 - } PACKED gdt_pci_sram; 711 + u32 magic; /* controller ID from BIOS */ 712 + u16 need_deinit; /* switch betw. BIOS/driver */ 713 + u8 switch_support; /* see need_deinit */ 714 + u8 padding[9]; 715 + u8 os_used[16]; /* OS code per service */ 716 + u8 unused[28]; 717 + u8 fw_magic; /* contr. ID from firmware */ 718 + } __attribute__((packed)) gdt_pci_sram; 719 719 720 720 /* SRAM structure EISA controllers (but NOT GDT3000/3020) */ 721 721 typedef struct { 722 - unchar os_used[16]; /* OS code per service */ 723 - ushort need_deinit; /* switch betw. BIOS/driver */ 724 - unchar switch_support; /* see need_deinit */ 725 - unchar padding; 726 - } PACKED gdt_eisa_sram; 722 + u8 os_used[16]; /* OS code per service */ 723 + u16 need_deinit; /* switch betw. BIOS/driver */ 724 + u8 switch_support; /* see need_deinit */ 725 + u8 padding; 726 + } __attribute__((packed)) gdt_eisa_sram; 727 727 728 728 729 729 /* DPRAM ISA controllers */ 730 730 typedef struct { 731 731 union { 732 732 struct { 733 - unchar bios_used[0x3c00-32]; /* 15KB - 32Bytes BIOS */ 734 - ulong32 magic; /* controller (EISA) ID */ 735 - ushort need_deinit; /* switch betw. BIOS/driver */ 736 - unchar switch_support; /* see need_deinit */ 737 - unchar padding[9]; 738 - unchar os_used[16]; /* OS code per service */ 739 - } PACKED dp_sram; 740 - unchar bios_area[0x4000]; /* 16KB reserved for BIOS */ 733 + u8 bios_used[0x3c00-32]; /* 15KB - 32Bytes BIOS */ 734 + u32 magic; /* controller (EISA) ID */ 735 + u16 need_deinit; /* switch betw. BIOS/driver */ 736 + u8 switch_support; /* see need_deinit */ 737 + u8 padding[9]; 738 + u8 os_used[16]; /* OS code per service */ 739 + } __attribute__((packed)) dp_sram; 740 + u8 bios_area[0x4000]; /* 16KB reserved for BIOS */ 741 741 } bu; 742 742 union { 743 743 gdt_dpr_if ic; /* interface area */ 744 - unchar if_area[0x3000]; /* 12KB for interface */ 744 + u8 if_area[0x3000]; /* 12KB for interface */ 745 745 } u; 746 746 struct { 747 - unchar memlock; /* write protection DPRAM */ 748 - unchar event; /* release event */ 749 - unchar irqen; /* board interrupts enable */ 750 - unchar irqdel; /* acknowledge board int. */ 751 - unchar volatile Sema1; /* status semaphore */ 752 - unchar rq; /* IRQ/DRQ configuration */ 753 - } PACKED io; 754 - } PACKED gdt2_dpram_str; 747 + u8 memlock; /* write protection DPRAM */ 748 + u8 event; /* release event */ 749 + u8 irqen; /* board interrupts enable */ 750 + u8 irqdel; /* acknowledge board int. */ 751 + u8 volatile Sema1; /* status semaphore */ 752 + u8 rq; /* IRQ/DRQ configuration */ 753 + } __attribute__((packed)) io; 754 + } __attribute__((packed)) gdt2_dpram_str; 755 755 756 756 /* DPRAM PCI controllers */ 757 757 typedef struct { 758 758 union { 759 759 gdt_dpr_if ic; /* interface area */ 760 - unchar if_area[0xff0-sizeof(gdt_pci_sram)]; 760 + u8 if_area[0xff0-sizeof(gdt_pci_sram)]; 761 761 } u; 762 762 gdt_pci_sram gdt6sr; /* SRAM structure */ 763 763 struct { 764 - unchar unused0[1]; 765 - unchar volatile Sema1; /* command semaphore */ 766 - unchar unused1[3]; 767 - unchar irqen; /* board interrupts enable */ 768 - unchar unused2[2]; 769 - unchar event; /* release event */ 770 - unchar unused3[3]; 771 - unchar irqdel; /* acknowledge board int. */ 772 - unchar unused4[3]; 773 - } PACKED io; 774 - } PACKED gdt6_dpram_str; 764 + u8 unused0[1]; 765 + u8 volatile Sema1; /* command semaphore */ 766 + u8 unused1[3]; 767 + u8 irqen; /* board interrupts enable */ 768 + u8 unused2[2]; 769 + u8 event; /* release event */ 770 + u8 unused3[3]; 771 + u8 irqdel; /* acknowledge board int. */ 772 + u8 unused4[3]; 773 + } __attribute__((packed)) io; 774 + } __attribute__((packed)) gdt6_dpram_str; 775 775 776 776 /* PLX register structure (new PCI controllers) */ 777 777 typedef struct { 778 - unchar cfg_reg; /* DPRAM cfg.(2:below 1MB,0:anywhere)*/ 779 - unchar unused1[0x3f]; 780 - unchar volatile sema0_reg; /* command semaphore */ 781 - unchar volatile sema1_reg; /* status semaphore */ 782 - unchar unused2[2]; 783 - ushort volatile status; /* command status */ 784 - ushort service; /* service */ 785 - ulong32 info[2]; /* additional info */ 786 - unchar unused3[0x10]; 787 - unchar ldoor_reg; /* PCI to local doorbell */ 788 - unchar unused4[3]; 789 - unchar volatile edoor_reg; /* local to PCI doorbell */ 790 - unchar unused5[3]; 791 - unchar control0; /* control0 register(unused) */ 792 - unchar control1; /* board interrupts enable */ 793 - unchar unused6[0x16]; 794 - } PACKED gdt6c_plx_regs; 778 + u8 cfg_reg; /* DPRAM cfg.(2:below 1MB,0:anywhere)*/ 779 + u8 unused1[0x3f]; 780 + u8 volatile sema0_reg; /* command semaphore */ 781 + u8 volatile sema1_reg; /* status semaphore */ 782 + u8 unused2[2]; 783 + u16 volatile status; /* command status */ 784 + u16 service; /* service */ 785 + u32 info[2]; /* additional info */ 786 + u8 unused3[0x10]; 787 + u8 ldoor_reg; /* PCI to local doorbell */ 788 + u8 unused4[3]; 789 + u8 volatile edoor_reg; /* local to PCI doorbell */ 790 + u8 unused5[3]; 791 + u8 control0; /* control0 register(unused) */ 792 + u8 control1; /* board interrupts enable */ 793 + u8 unused6[0x16]; 794 + } __attribute__((packed)) gdt6c_plx_regs; 795 795 796 796 /* DPRAM new PCI controllers */ 797 797 typedef struct { 798 798 union { 799 799 gdt_dpr_if ic; /* interface area */ 800 - unchar if_area[0x4000-sizeof(gdt_pci_sram)]; 800 + u8 if_area[0x4000-sizeof(gdt_pci_sram)]; 801 801 } u; 802 802 gdt_pci_sram gdt6sr; /* SRAM structure */ 803 - } PACKED gdt6c_dpram_str; 803 + } __attribute__((packed)) gdt6c_dpram_str; 804 804 805 805 /* i960 register structure (PCI MPR controllers) */ 806 806 typedef struct { 807 - unchar unused1[16]; 808 - unchar volatile sema0_reg; /* command semaphore */ 809 - unchar unused2; 810 - unchar volatile sema1_reg; /* status semaphore */ 811 - unchar unused3; 812 - ushort volatile status; /* command status */ 813 - ushort service; /* service */ 814 - ulong32 info[2]; /* additional info */ 815 - unchar ldoor_reg; /* PCI to local doorbell */ 816 - unchar unused4[11]; 817 - unchar volatile edoor_reg; /* local to PCI doorbell */ 818 - unchar unused5[7]; 819 - unchar edoor_en_reg; /* board interrupts enable */ 820 - unchar unused6[27]; 821 - ulong32 unused7[939]; 822 - ulong32 severity; 807 + u8 unused1[16]; 808 + u8 volatile sema0_reg; /* command semaphore */ 809 + u8 unused2; 810 + u8 volatile sema1_reg; /* status semaphore */ 811 + u8 unused3; 812 + u16 volatile status; /* command status */ 813 + u16 service; /* service */ 814 + u32 info[2]; /* additional info */ 815 + u8 ldoor_reg; /* PCI to local doorbell */ 816 + u8 unused4[11]; 817 + u8 volatile edoor_reg; /* local to PCI doorbell */ 818 + u8 unused5[7]; 819 + u8 edoor_en_reg; /* board interrupts enable */ 820 + u8 unused6[27]; 821 + u32 unused7[939]; 822 + u32 severity; 823 823 char evt_str[256]; /* event string */ 824 - } PACKED gdt6m_i960_regs; 824 + } __attribute__((packed)) gdt6m_i960_regs; 825 825 826 826 /* DPRAM PCI MPR controllers */ 827 827 typedef struct { 828 828 gdt6m_i960_regs i960r; /* 4KB i960 registers */ 829 829 union { 830 830 gdt_dpr_if ic; /* interface area */ 831 - unchar if_area[0x3000-sizeof(gdt_pci_sram)]; 831 + u8 if_area[0x3000-sizeof(gdt_pci_sram)]; 832 832 } u; 833 833 gdt_pci_sram gdt6sr; /* SRAM structure */ 834 - } PACKED gdt6m_dpram_str; 834 + } __attribute__((packed)) gdt6m_dpram_str; 835 835 836 836 837 837 /* PCI resources */ 838 838 typedef struct { 839 839 struct pci_dev *pdev; 840 - ulong dpmem; /* DPRAM address */ 841 - ulong io; /* IO address */ 840 + unsigned long dpmem; /* DPRAM address */ 841 + unsigned long io; /* IO address */ 842 842 } gdth_pci_str; 843 843 844 844 ··· 846 846 typedef struct { 847 847 struct Scsi_Host *shost; 848 848 struct list_head list; 849 - ushort hanum; 850 - ushort oem_id; /* OEM */ 851 - ushort type; /* controller class */ 852 - ulong32 stype; /* subtype (PCI: device ID) */ 853 - ushort fw_vers; /* firmware version */ 854 - ushort cache_feat; /* feat. cache serv. (s/g,..)*/ 855 - ushort raw_feat; /* feat. raw service (s/g,..)*/ 856 - ushort screen_feat; /* feat. raw service (s/g,..)*/ 857 - ushort bmic; /* BMIC address (EISA) */ 849 + u16 hanum; 850 + u16 oem_id; /* OEM */ 851 + u16 type; /* controller class */ 852 + u32 stype; /* subtype (PCI: device ID) */ 853 + u16 fw_vers; /* firmware version */ 854 + u16 cache_feat; /* feat. cache serv. (s/g,..)*/ 855 + u16 raw_feat; /* feat. raw service (s/g,..)*/ 856 + u16 screen_feat; /* feat. raw service (s/g,..)*/ 857 + u16 bmic; /* BMIC address (EISA) */ 858 858 void __iomem *brd; /* DPRAM address */ 859 - ulong32 brd_phys; /* slot number/BIOS address */ 859 + u32 brd_phys; /* slot number/BIOS address */ 860 860 gdt6c_plx_regs *plx; /* PLX regs (new PCI contr.) */ 861 861 gdth_cmd_str cmdext; 862 862 gdth_cmd_str *pccb; /* address command structure */ 863 - ulong32 ccb_phys; /* phys. address */ 863 + u32 ccb_phys; /* phys. address */ 864 864 #ifdef INT_COAL 865 865 gdth_coal_status *coal_stat; /* buffer for coalescing int.*/ 866 - ulong64 coal_stat_phys; /* phys. address */ 866 + u64 coal_stat_phys; /* phys. address */ 867 867 #endif 868 868 char *pscratch; /* scratch (DMA) buffer */ 869 - ulong64 scratch_phys; /* phys. address */ 870 - unchar scratch_busy; /* in use? */ 871 - unchar dma64_support; /* 64-bit DMA supported? */ 869 + u64 scratch_phys; /* phys. address */ 870 + u8 scratch_busy; /* in use? */ 871 + u8 dma64_support; /* 64-bit DMA supported? */ 872 872 gdth_msg_str *pmsg; /* message buffer */ 873 - ulong64 msg_phys; /* phys. address */ 874 - unchar scan_mode; /* current scan mode */ 875 - unchar irq; /* IRQ */ 876 - unchar drq; /* DRQ (ISA controllers) */ 877 - ushort status; /* command status */ 878 - ushort service; /* service/firmware ver./.. */ 879 - ulong32 info; 880 - ulong32 info2; /* additional info */ 873 + u64 msg_phys; /* phys. address */ 874 + u8 scan_mode; /* current scan mode */ 875 + u8 irq; /* IRQ */ 876 + u8 drq; /* DRQ (ISA controllers) */ 877 + u16 status; /* command status */ 878 + u16 service; /* service/firmware ver./.. */ 879 + u32 info; 880 + u32 info2; /* additional info */ 881 881 Scsi_Cmnd *req_first; /* top of request queue */ 882 882 struct { 883 - unchar present; /* Flag: host drive present? */ 884 - unchar is_logdrv; /* Flag: log. drive (master)? */ 885 - unchar is_arraydrv; /* Flag: array drive? */ 886 - unchar is_master; /* Flag: array drive master? */ 887 - unchar is_parity; /* Flag: parity drive? */ 888 - unchar is_hotfix; /* Flag: hotfix drive? */ 889 - unchar master_no; /* number of master drive */ 890 - unchar lock; /* drive locked? (hot plug) */ 891 - unchar heads; /* mapping */ 892 - unchar secs; 893 - ushort devtype; /* further information */ 894 - ulong64 size; /* capacity */ 895 - unchar ldr_no; /* log. drive no. */ 896 - unchar rw_attribs; /* r/w attributes */ 897 - unchar cluster_type; /* cluster properties */ 898 - unchar media_changed; /* Flag:MOUNT/UNMOUNT occured */ 899 - ulong32 start_sec; /* start sector */ 883 + u8 present; /* Flag: host drive present? */ 884 + u8 is_logdrv; /* Flag: log. drive (master)? */ 885 + u8 is_arraydrv; /* Flag: array drive? */ 886 + u8 is_master; /* Flag: array drive master? */ 887 + u8 is_parity; /* Flag: parity drive? */ 888 + u8 is_hotfix; /* Flag: hotfix drive? */ 889 + u8 master_no; /* number of master drive */ 890 + u8 lock; /* drive locked? (hot plug) */ 891 + u8 heads; /* mapping */ 892 + u8 secs; 893 + u16 devtype; /* further information */ 894 + u64 size; /* capacity */ 895 + u8 ldr_no; /* log. drive no. */ 896 + u8 rw_attribs; /* r/w attributes */ 897 + u8 cluster_type; /* cluster properties */ 898 + u8 media_changed; /* Flag:MOUNT/UNMOUNT occured */ 899 + u32 start_sec; /* start sector */ 900 900 } hdr[MAX_LDRIVES]; /* host drives */ 901 901 struct { 902 - unchar lock; /* channel locked? (hot plug) */ 903 - unchar pdev_cnt; /* physical device count */ 904 - unchar local_no; /* local channel number */ 905 - unchar io_cnt[MAXID]; /* current IO count */ 906 - ulong32 address; /* channel address */ 907 - ulong32 id_list[MAXID]; /* IDs of the phys. devices */ 902 + u8 lock; /* channel locked? (hot plug) */ 903 + u8 pdev_cnt; /* physical device count */ 904 + u8 local_no; /* local channel number */ 905 + u8 io_cnt[MAXID]; /* current IO count */ 906 + u32 address; /* channel address */ 907 + u32 id_list[MAXID]; /* IDs of the phys. devices */ 908 908 } raw[MAXBUS]; /* SCSI channels */ 909 909 struct { 910 910 Scsi_Cmnd *cmnd; /* pending request */ 911 - ushort service; /* service */ 911 + u16 service; /* service */ 912 912 } cmd_tab[GDTH_MAXCMDS]; /* table of pend. requests */ 913 913 struct gdth_cmndinfo { /* per-command private info */ 914 914 int index; 915 915 int internal_command; /* don't call scsi_done */ 916 916 gdth_cmd_str *internal_cmd_str; /* crier for internal messages*/ 917 917 dma_addr_t sense_paddr; /* sense dma-addr */ 918 - unchar priority; 918 + u8 priority; 919 919 int timeout_count; /* # of timeout calls */ 920 920 volatile int wait_for_completion; 921 - ushort status; 922 - ulong32 info; 921 + u16 status; 922 + u32 info; 923 923 enum dma_data_direction dma_dir; 924 924 int phase; /* ???? */ 925 925 int OpCode; 926 926 } cmndinfo[GDTH_MAXCMDS]; /* index==0 is free */ 927 - unchar bus_cnt; /* SCSI bus count */ 928 - unchar tid_cnt; /* Target ID count */ 929 - unchar bus_id[MAXBUS]; /* IOP IDs */ 930 - unchar virt_bus; /* number of virtual bus */ 931 - unchar more_proc; /* more /proc info supported */ 932 - ushort cmd_cnt; /* command count in DPRAM */ 933 - ushort cmd_len; /* length of actual command */ 934 - ushort cmd_offs_dpmem; /* actual offset in DPRAM */ 935 - ushort ic_all_size; /* sizeof DPRAM interf. area */ 927 + u8 bus_cnt; /* SCSI bus count */ 928 + u8 tid_cnt; /* Target ID count */ 929 + u8 bus_id[MAXBUS]; /* IOP IDs */ 930 + u8 virt_bus; /* number of virtual bus */ 931 + u8 more_proc; /* more /proc info supported */ 932 + u16 cmd_cnt; /* command count in DPRAM */ 933 + u16 cmd_len; /* length of actual command */ 934 + u16 cmd_offs_dpmem; /* actual offset in DPRAM */ 935 + u16 ic_all_size; /* sizeof DPRAM interf. area */ 936 936 gdth_cpar_str cpar; /* controller cache par. */ 937 937 gdth_bfeat_str bfeat; /* controller features */ 938 938 gdth_binfo_str binfo; /* controller info */ ··· 941 941 struct pci_dev *pdev; 942 942 char oem_name[8]; 943 943 #ifdef GDTH_DMA_STATISTICS 944 - ulong dma32_cnt, dma64_cnt; /* statistics: DMA buffer */ 944 + unsigned long dma32_cnt, dma64_cnt; /* statistics: DMA buffer */ 945 945 #endif 946 946 struct scsi_device *sdev; 947 947 } gdth_ha_str; ··· 953 953 954 954 /* INQUIRY data format */ 955 955 typedef struct { 956 - unchar type_qual; 957 - unchar modif_rmb; 958 - unchar version; 959 - unchar resp_aenc; 960 - unchar add_length; 961 - unchar reserved1; 962 - unchar reserved2; 963 - unchar misc; 964 - unchar vendor[8]; 965 - unchar product[16]; 966 - unchar revision[4]; 967 - } PACKED gdth_inq_data; 956 + u8 type_qual; 957 + u8 modif_rmb; 958 + u8 version; 959 + u8 resp_aenc; 960 + u8 add_length; 961 + u8 reserved1; 962 + u8 reserved2; 963 + u8 misc; 964 + u8 vendor[8]; 965 + u8 product[16]; 966 + u8 revision[4]; 967 + } __attribute__((packed)) gdth_inq_data; 968 968 969 969 /* READ_CAPACITY data format */ 970 970 typedef struct { 971 - ulong32 last_block_no; 972 - ulong32 block_length; 973 - } PACKED gdth_rdcap_data; 971 + u32 last_block_no; 972 + u32 block_length; 973 + } __attribute__((packed)) gdth_rdcap_data; 974 974 975 975 /* READ_CAPACITY (16) data format */ 976 976 typedef struct { 977 - ulong64 last_block_no; 978 - ulong32 block_length; 979 - } PACKED gdth_rdcap16_data; 977 + u64 last_block_no; 978 + u32 block_length; 979 + } __attribute__((packed)) gdth_rdcap16_data; 980 980 981 981 /* REQUEST_SENSE data format */ 982 982 typedef struct { 983 - unchar errorcode; 984 - unchar segno; 985 - unchar key; 986 - ulong32 info; 987 - unchar add_length; 988 - ulong32 cmd_info; 989 - unchar adsc; 990 - unchar adsq; 991 - unchar fruc; 992 - unchar key_spec[3]; 993 - } PACKED gdth_sense_data; 983 + u8 errorcode; 984 + u8 segno; 985 + u8 key; 986 + u32 info; 987 + u8 add_length; 988 + u32 cmd_info; 989 + u8 adsc; 990 + u8 adsq; 991 + u8 fruc; 992 + u8 key_spec[3]; 993 + } __attribute__((packed)) gdth_sense_data; 994 994 995 995 /* MODE_SENSE data format */ 996 996 typedef struct { 997 997 struct { 998 - unchar data_length; 999 - unchar med_type; 1000 - unchar dev_par; 1001 - unchar bd_length; 1002 - } PACKED hd; 998 + u8 data_length; 999 + u8 med_type; 1000 + u8 dev_par; 1001 + u8 bd_length; 1002 + } __attribute__((packed)) hd; 1003 1003 struct { 1004 - unchar dens_code; 1005 - unchar block_count[3]; 1006 - unchar reserved; 1007 - unchar block_length[3]; 1008 - } PACKED bd; 1009 - } PACKED gdth_modep_data; 1004 + u8 dens_code; 1005 + u8 block_count[3]; 1006 + u8 reserved; 1007 + u8 block_length[3]; 1008 + } __attribute__((packed)) bd; 1009 + } __attribute__((packed)) gdth_modep_data; 1010 1010 1011 1011 /* stack frame */ 1012 1012 typedef struct { 1013 - ulong b[10]; /* 32/64 bit compiler ! */ 1014 - } PACKED gdth_stackframe; 1013 + unsigned long b[10]; /* 32/64 bit compiler ! */ 1014 + } __attribute__((packed)) gdth_stackframe; 1015 1015 1016 1016 1017 1017 /* function prototyping */
+179 -187
drivers/scsi/gdth_ioctl.h
··· 32 32 #define MAX_HDRIVES MAX_LDRIVES /* max. host drive count */ 33 33 #endif 34 34 35 - /* typedefs */ 36 - #ifdef __KERNEL__ 37 - typedef u32 ulong32; 38 - typedef u64 ulong64; 39 - #endif 40 - 41 - #define PACKED __attribute__((packed)) 42 - 43 35 /* scatter/gather element */ 44 36 typedef struct { 45 - ulong32 sg_ptr; /* address */ 46 - ulong32 sg_len; /* length */ 47 - } PACKED gdth_sg_str; 37 + u32 sg_ptr; /* address */ 38 + u32 sg_len; /* length */ 39 + } __attribute__((packed)) gdth_sg_str; 48 40 49 41 /* scatter/gather element - 64bit addresses */ 50 42 typedef struct { 51 - ulong64 sg_ptr; /* address */ 52 - ulong32 sg_len; /* length */ 53 - } PACKED gdth_sg64_str; 43 + u64 sg_ptr; /* address */ 44 + u32 sg_len; /* length */ 45 + } __attribute__((packed)) gdth_sg64_str; 54 46 55 47 /* command structure */ 56 48 typedef struct { 57 - ulong32 BoardNode; /* board node (always 0) */ 58 - ulong32 CommandIndex; /* command number */ 59 - ushort OpCode; /* the command (READ,..) */ 49 + u32 BoardNode; /* board node (always 0) */ 50 + u32 CommandIndex; /* command number */ 51 + u16 OpCode; /* the command (READ,..) */ 60 52 union { 61 53 struct { 62 - ushort DeviceNo; /* number of cache drive */ 63 - ulong32 BlockNo; /* block number */ 64 - ulong32 BlockCnt; /* block count */ 65 - ulong32 DestAddr; /* dest. addr. (if s/g: -1) */ 66 - ulong32 sg_canz; /* s/g element count */ 54 + u16 DeviceNo; /* number of cache drive */ 55 + u32 BlockNo; /* block number */ 56 + u32 BlockCnt; /* block count */ 57 + u32 DestAddr; /* dest. addr. (if s/g: -1) */ 58 + u32 sg_canz; /* s/g element count */ 67 59 gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ 68 - } PACKED cache; /* cache service cmd. str. */ 60 + } __attribute__((packed)) cache; /* cache service cmd. str. */ 69 61 struct { 70 - ushort DeviceNo; /* number of cache drive */ 71 - ulong64 BlockNo; /* block number */ 72 - ulong32 BlockCnt; /* block count */ 73 - ulong64 DestAddr; /* dest. addr. (if s/g: -1) */ 74 - ulong32 sg_canz; /* s/g element count */ 62 + u16 DeviceNo; /* number of cache drive */ 63 + u64 BlockNo; /* block number */ 64 + u32 BlockCnt; /* block count */ 65 + u64 DestAddr; /* dest. addr. (if s/g: -1) */ 66 + u32 sg_canz; /* s/g element count */ 75 67 gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */ 76 - } PACKED cache64; /* cache service cmd. str. */ 68 + } __attribute__((packed)) cache64; /* cache service cmd. str. */ 77 69 struct { 78 - ushort param_size; /* size of p_param buffer */ 79 - ulong32 subfunc; /* IOCTL function */ 80 - ulong32 channel; /* device */ 81 - ulong64 p_param; /* buffer */ 82 - } PACKED ioctl; /* IOCTL command structure */ 70 + u16 param_size; /* size of p_param buffer */ 71 + u32 subfunc; /* IOCTL function */ 72 + u32 channel; /* device */ 73 + u64 p_param; /* buffer */ 74 + } __attribute__((packed)) ioctl; /* IOCTL command structure */ 83 75 struct { 84 - ushort reserved; 76 + u16 reserved; 85 77 union { 86 78 struct { 87 - ulong32 msg_handle; /* message handle */ 88 - ulong64 msg_addr; /* message buffer address */ 89 - } PACKED msg; 90 - unchar data[12]; /* buffer for rtc data, ... */ 79 + u32 msg_handle; /* message handle */ 80 + u64 msg_addr; /* message buffer address */ 81 + } __attribute__((packed)) msg; 82 + u8 data[12]; /* buffer for rtc data, ... */ 91 83 } su; 92 - } PACKED screen; /* screen service cmd. str. */ 84 + } __attribute__((packed)) screen; /* screen service cmd. str. */ 93 85 struct { 94 - ushort reserved; 95 - ulong32 direction; /* data direction */ 96 - ulong32 mdisc_time; /* disc. time (0: no timeout)*/ 97 - ulong32 mcon_time; /* connect time(0: no to.) */ 98 - ulong32 sdata; /* dest. addr. (if s/g: -1) */ 99 - ulong32 sdlen; /* data length (bytes) */ 100 - ulong32 clen; /* SCSI cmd. length(6,10,12) */ 101 - unchar cmd[12]; /* SCSI command */ 102 - unchar target; /* target ID */ 103 - unchar lun; /* LUN */ 104 - unchar bus; /* SCSI bus number */ 105 - unchar priority; /* only 0 used */ 106 - ulong32 sense_len; /* sense data length */ 107 - ulong32 sense_data; /* sense data addr. */ 108 - ulong32 link_p; /* linked cmds (not supp.) */ 109 - ulong32 sg_ranz; /* s/g element count */ 86 + u16 reserved; 87 + u32 direction; /* data direction */ 88 + u32 mdisc_time; /* disc. time (0: no timeout)*/ 89 + u32 mcon_time; /* connect time(0: no to.) */ 90 + u32 sdata; /* dest. addr. (if s/g: -1) */ 91 + u32 sdlen; /* data length (bytes) */ 92 + u32 clen; /* SCSI cmd. length(6,10,12) */ 93 + u8 cmd[12]; /* SCSI command */ 94 + u8 target; /* target ID */ 95 + u8 lun; /* LUN */ 96 + u8 bus; /* SCSI bus number */ 97 + u8 priority; /* only 0 used */ 98 + u32 sense_len; /* sense data length */ 99 + u32 sense_data; /* sense data addr. */ 100 + u32 link_p; /* linked cmds (not supp.) */ 101 + u32 sg_ranz; /* s/g element count */ 110 102 gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ 111 - } PACKED raw; /* raw service cmd. struct. */ 103 + } __attribute__((packed)) raw; /* raw service cmd. struct. */ 112 104 struct { 113 - ushort reserved; 114 - ulong32 direction; /* data direction */ 115 - ulong32 mdisc_time; /* disc. time (0: no timeout)*/ 116 - ulong32 mcon_time; /* connect time(0: no to.) */ 117 - ulong64 sdata; /* dest. addr. (if s/g: -1) */ 118 - ulong32 sdlen; /* data length (bytes) */ 119 - ulong32 clen; /* SCSI cmd. length(6,..,16) */ 120 - unchar cmd[16]; /* SCSI command */ 121 - unchar target; /* target ID */ 122 - unchar lun; /* LUN */ 123 - unchar bus; /* SCSI bus number */ 124 - unchar priority; /* only 0 used */ 125 - ulong32 sense_len; /* sense data length */ 126 - ulong64 sense_data; /* sense data addr. */ 127 - ulong32 sg_ranz; /* s/g element count */ 105 + u16 reserved; 106 + u32 direction; /* data direction */ 107 + u32 mdisc_time; /* disc. time (0: no timeout)*/ 108 + u32 mcon_time; /* connect time(0: no to.) */ 109 + u64 sdata; /* dest. addr. (if s/g: -1) */ 110 + u32 sdlen; /* data length (bytes) */ 111 + u32 clen; /* SCSI cmd. length(6,..,16) */ 112 + u8 cmd[16]; /* SCSI command */ 113 + u8 target; /* target ID */ 114 + u8 lun; /* LUN */ 115 + u8 bus; /* SCSI bus number */ 116 + u8 priority; /* only 0 used */ 117 + u32 sense_len; /* sense data length */ 118 + u64 sense_data; /* sense data addr. */ 119 + u32 sg_ranz; /* s/g element count */ 128 120 gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */ 129 - } PACKED raw64; /* raw service cmd. struct. */ 121 + } __attribute__((packed)) raw64; /* raw service cmd. struct. */ 130 122 } u; 131 123 /* additional variables */ 132 - unchar Service; /* controller service */ 133 - unchar reserved; 134 - ushort Status; /* command result */ 135 - ulong32 Info; /* additional information */ 124 + u8 Service; /* controller service */ 125 + u8 reserved; 126 + u16 Status; /* command result */ 127 + u32 Info; /* additional information */ 136 128 void *RequestBuffer; /* request buffer */ 137 - } PACKED gdth_cmd_str; 129 + } __attribute__((packed)) gdth_cmd_str; 138 130 139 131 /* controller event structure */ 140 132 #define ES_ASYNC 1 ··· 134 142 #define ES_TEST 3 135 143 #define ES_SYNC 4 136 144 typedef struct { 137 - ushort size; /* size of structure */ 145 + u16 size; /* size of structure */ 138 146 union { 139 147 char stream[16]; 140 148 struct { 141 - ushort ionode; 142 - ushort service; 143 - ulong32 index; 144 - } PACKED driver; 149 + u16 ionode; 150 + u16 service; 151 + u32 index; 152 + } __attribute__((packed)) driver; 145 153 struct { 146 - ushort ionode; 147 - ushort service; 148 - ushort status; 149 - ulong32 info; 150 - unchar scsi_coord[3]; 151 - } PACKED async; 154 + u16 ionode; 155 + u16 service; 156 + u16 status; 157 + u32 info; 158 + u8 scsi_coord[3]; 159 + } __attribute__((packed)) async; 152 160 struct { 153 - ushort ionode; 154 - ushort service; 155 - ushort status; 156 - ulong32 info; 157 - ushort hostdrive; 158 - unchar scsi_coord[3]; 159 - unchar sense_key; 160 - } PACKED sync; 161 + u16 ionode; 162 + u16 service; 163 + u16 status; 164 + u32 info; 165 + u16 hostdrive; 166 + u8 scsi_coord[3]; 167 + u8 sense_key; 168 + } __attribute__((packed)) sync; 161 169 struct { 162 - ulong32 l1, l2, l3, l4; 163 - } PACKED test; 170 + u32 l1, l2, l3, l4; 171 + } __attribute__((packed)) test; 164 172 } eu; 165 - ulong32 severity; 166 - unchar event_string[256]; 167 - } PACKED gdth_evt_data; 173 + u32 severity; 174 + u8 event_string[256]; 175 + } __attribute__((packed)) gdth_evt_data; 168 176 169 177 typedef struct { 170 - ulong32 first_stamp; 171 - ulong32 last_stamp; 172 - ushort same_count; 173 - ushort event_source; 174 - ushort event_idx; 175 - unchar application; 176 - unchar reserved; 178 + u32 first_stamp; 179 + u32 last_stamp; 180 + u16 same_count; 181 + u16 event_source; 182 + u16 event_idx; 183 + u8 application; 184 + u8 reserved; 177 185 gdth_evt_data event_data; 178 - } PACKED gdth_evt_str; 186 + } __attribute__((packed)) gdth_evt_str; 179 187 180 188 181 189 #ifdef GDTH_IOCTL_PROC 182 190 /* IOCTL structure (write) */ 183 191 typedef struct { 184 - ulong32 magic; /* IOCTL magic */ 185 - ushort ioctl; /* IOCTL */ 186 - ushort ionode; /* controller number */ 187 - ushort service; /* controller service */ 188 - ushort timeout; /* timeout */ 192 + u32 magic; /* IOCTL magic */ 193 + u16 ioctl; /* IOCTL */ 194 + u16 ionode; /* controller number */ 195 + u16 service; /* controller service */ 196 + u16 timeout; /* timeout */ 189 197 union { 190 198 struct { 191 - unchar command[512]; /* controller command */ 192 - unchar data[1]; /* add. data */ 199 + u8 command[512]; /* controller command */ 200 + u8 data[1]; /* add. data */ 193 201 } general; 194 202 struct { 195 - unchar lock; /* lock/unlock */ 196 - unchar drive_cnt; /* drive count */ 197 - ushort drives[MAX_HDRIVES];/* drives */ 203 + u8 lock; /* lock/unlock */ 204 + u8 drive_cnt; /* drive count */ 205 + u16 drives[MAX_HDRIVES];/* drives */ 198 206 } lockdrv; 199 207 struct { 200 - unchar lock; /* lock/unlock */ 201 - unchar channel; /* channel */ 208 + u8 lock; /* lock/unlock */ 209 + u8 channel; /* channel */ 202 210 } lockchn; 203 211 struct { 204 212 int erase; /* erase event ? */ 205 213 int handle; 206 - unchar evt[EVENT_SIZE]; /* event structure */ 214 + u8 evt[EVENT_SIZE]; /* event structure */ 207 215 } event; 208 216 struct { 209 - unchar bus; /* SCSI bus */ 210 - unchar target; /* target ID */ 211 - unchar lun; /* LUN */ 212 - unchar cmd_len; /* command length */ 213 - unchar cmd[12]; /* SCSI command */ 217 + u8 bus; /* SCSI bus */ 218 + u8 target; /* target ID */ 219 + u8 lun; /* LUN */ 220 + u8 cmd_len; /* command length */ 221 + u8 cmd[12]; /* SCSI command */ 214 222 } scsi; 215 223 struct { 216 - ushort hdr_no; /* host drive number */ 217 - unchar flag; /* old meth./add/remove */ 224 + u16 hdr_no; /* host drive number */ 225 + u8 flag; /* old meth./add/remove */ 218 226 } rescan; 219 227 } iu; 220 228 } gdth_iowr_str; 221 229 222 230 /* IOCTL structure (read) */ 223 231 typedef struct { 224 - ulong32 size; /* buffer size */ 225 - ulong32 status; /* IOCTL error code */ 232 + u32 size; /* buffer size */ 233 + u32 status; /* IOCTL error code */ 226 234 union { 227 235 struct { 228 - unchar data[1]; /* data */ 236 + u8 data[1]; /* data */ 229 237 } general; 230 238 struct { 231 - ushort version; /* driver version */ 239 + u16 version; /* driver version */ 232 240 } drvers; 233 241 struct { 234 - unchar type; /* controller type */ 235 - ushort info; /* slot etc. */ 236 - ushort oem_id; /* OEM ID */ 237 - ushort bios_ver; /* not used */ 238 - ushort access; /* not used */ 239 - ushort ext_type; /* extended type */ 240 - ushort device_id; /* device ID */ 241 - ushort sub_device_id; /* sub device ID */ 242 + u8 type; /* controller type */ 243 + u16 info; /* slot etc. */ 244 + u16 oem_id; /* OEM ID */ 245 + u16 bios_ver; /* not used */ 246 + u16 access; /* not used */ 247 + u16 ext_type; /* extended type */ 248 + u16 device_id; /* device ID */ 249 + u16 sub_device_id; /* sub device ID */ 242 250 } ctrtype; 243 251 struct { 244 - unchar version; /* OS version */ 245 - unchar subversion; /* OS subversion */ 246 - ushort revision; /* revision */ 252 + u8 version; /* OS version */ 253 + u8 subversion; /* OS subversion */ 254 + u16 revision; /* revision */ 247 255 } osvers; 248 256 struct { 249 - ushort count; /* controller count */ 257 + u16 count; /* controller count */ 250 258 } ctrcnt; 251 259 struct { 252 260 int handle; 253 - unchar evt[EVENT_SIZE]; /* event structure */ 261 + u8 evt[EVENT_SIZE]; /* event structure */ 254 262 } event; 255 263 struct { 256 - unchar bus; /* SCSI bus, 0xff: invalid */ 257 - unchar target; /* target ID */ 258 - unchar lun; /* LUN */ 259 - unchar cluster_type; /* cluster properties */ 264 + u8 bus; /* SCSI bus, 0xff: invalid */ 265 + u8 target; /* target ID */ 266 + u8 lun; /* LUN */ 267 + u8 cluster_type; /* cluster properties */ 260 268 } hdr_list[MAX_HDRIVES]; /* index is host drive number */ 261 269 } iu; 262 270 } gdth_iord_str; ··· 264 272 265 273 /* GDTIOCTL_GENERAL */ 266 274 typedef struct { 267 - ushort ionode; /* controller number */ 268 - ushort timeout; /* timeout */ 269 - ulong32 info; /* error info */ 270 - ushort status; /* status */ 271 - ulong data_len; /* data buffer size */ 272 - ulong sense_len; /* sense buffer size */ 275 + u16 ionode; /* controller number */ 276 + u16 timeout; /* timeout */ 277 + u32 info; /* error info */ 278 + u16 status; /* status */ 279 + unsigned long data_len; /* data buffer size */ 280 + unsigned long sense_len; /* sense buffer size */ 273 281 gdth_cmd_str command; /* command */ 274 282 } gdth_ioctl_general; 275 283 276 284 /* GDTIOCTL_LOCKDRV */ 277 285 typedef struct { 278 - ushort ionode; /* controller number */ 279 - unchar lock; /* lock/unlock */ 280 - unchar drive_cnt; /* drive count */ 281 - ushort drives[MAX_HDRIVES]; /* drives */ 286 + u16 ionode; /* controller number */ 287 + u8 lock; /* lock/unlock */ 288 + u8 drive_cnt; /* drive count */ 289 + u16 drives[MAX_HDRIVES]; /* drives */ 282 290 } gdth_ioctl_lockdrv; 283 291 284 292 /* GDTIOCTL_LOCKCHN */ 285 293 typedef struct { 286 - ushort ionode; /* controller number */ 287 - unchar lock; /* lock/unlock */ 288 - unchar channel; /* channel */ 294 + u16 ionode; /* controller number */ 295 + u8 lock; /* lock/unlock */ 296 + u8 channel; /* channel */ 289 297 } gdth_ioctl_lockchn; 290 298 291 299 /* GDTIOCTL_OSVERS */ 292 300 typedef struct { 293 - unchar version; /* OS version */ 294 - unchar subversion; /* OS subversion */ 295 - ushort revision; /* revision */ 301 + u8 version; /* OS version */ 302 + u8 subversion; /* OS subversion */ 303 + u16 revision; /* revision */ 296 304 } gdth_ioctl_osvers; 297 305 298 306 /* GDTIOCTL_CTRTYPE */ 299 307 typedef struct { 300 - ushort ionode; /* controller number */ 301 - unchar type; /* controller type */ 302 - ushort info; /* slot etc. */ 303 - ushort oem_id; /* OEM ID */ 304 - ushort bios_ver; /* not used */ 305 - ushort access; /* not used */ 306 - ushort ext_type; /* extended type */ 307 - ushort device_id; /* device ID */ 308 - ushort sub_device_id; /* sub device ID */ 308 + u16 ionode; /* controller number */ 309 + u8 type; /* controller type */ 310 + u16 info; /* slot etc. */ 311 + u16 oem_id; /* OEM ID */ 312 + u16 bios_ver; /* not used */ 313 + u16 access; /* not used */ 314 + u16 ext_type; /* extended type */ 315 + u16 device_id; /* device ID */ 316 + u16 sub_device_id; /* sub device ID */ 309 317 } gdth_ioctl_ctrtype; 310 318 311 319 /* GDTIOCTL_EVENT */ 312 320 typedef struct { 313 - ushort ionode; 321 + u16 ionode; 314 322 int erase; /* erase event? */ 315 323 int handle; /* event handle */ 316 324 gdth_evt_str event; ··· 318 326 319 327 /* GDTIOCTL_RESCAN/GDTIOCTL_HDRLIST */ 320 328 typedef struct { 321 - ushort ionode; /* controller number */ 322 - unchar flag; /* add/remove */ 323 - ushort hdr_no; /* drive no. */ 329 + u16 ionode; /* controller number */ 330 + u8 flag; /* add/remove */ 331 + u16 hdr_no; /* drive no. */ 324 332 struct { 325 - unchar bus; /* SCSI bus */ 326 - unchar target; /* target ID */ 327 - unchar lun; /* LUN */ 328 - unchar cluster_type; /* cluster properties */ 333 + u8 bus; /* SCSI bus */ 334 + u8 target; /* target ID */ 335 + u8 lun; /* LUN */ 336 + u8 cluster_type; /* cluster properties */ 329 337 } hdr_list[MAX_HDRIVES]; /* index is host drive number */ 330 338 } gdth_ioctl_rescan; 331 339 332 340 /* GDTIOCTL_RESET_BUS/GDTIOCTL_RESET_DRV */ 333 341 typedef struct { 334 - ushort ionode; /* controller number */ 335 - ushort number; /* bus/host drive number */ 336 - ushort status; /* status */ 342 + u16 ionode; /* controller number */ 343 + u16 number; /* bus/host drive number */ 344 + u16 status; /* status */ 337 345 } gdth_ioctl_reset; 338 346 339 347 #endif
+21 -21
drivers/scsi/gdth_proc.c
··· 43 43 int i, found; 44 44 gdth_cmd_str gdtcmd; 45 45 gdth_cpar_str *pcpar; 46 - ulong64 paddr; 46 + u64 paddr; 47 47 48 48 char cmnd[MAX_COMMAND_SIZE]; 49 49 memset(cmnd, 0xff, 12); ··· 156 156 off_t begin = 0,pos = 0; 157 157 int id, i, j, k, sec, flag; 158 158 int no_mdrv = 0, drv_no, is_mirr; 159 - ulong32 cnt; 160 - ulong64 paddr; 159 + u32 cnt; 160 + u64 paddr; 161 161 int rc = -ENOMEM; 162 162 163 163 gdth_cmd_str *gdtcmd; ··· 220 220 221 221 if (ha->more_proc) 222 222 sprintf(hrec, "%d.%02d.%02d-%c%03X", 223 - (unchar)(ha->binfo.upd_fw_ver>>24), 224 - (unchar)(ha->binfo.upd_fw_ver>>16), 225 - (unchar)(ha->binfo.upd_fw_ver), 223 + (u8)(ha->binfo.upd_fw_ver>>24), 224 + (u8)(ha->binfo.upd_fw_ver>>16), 225 + (u8)(ha->binfo.upd_fw_ver), 226 226 ha->bfeat.raid ? 'R':'N', 227 227 ha->binfo.upd_revision); 228 228 else 229 - sprintf(hrec, "%d.%02d", (unchar)(ha->cpar.version>>8), 230 - (unchar)(ha->cpar.version)); 229 + sprintf(hrec, "%d.%02d", (u8)(ha->cpar.version>>8), 230 + (u8)(ha->cpar.version)); 231 231 232 232 size = sprintf(buffer+len, 233 233 " Driver Ver.: \t%-10s\tFirmware Ver.: \t%s\n", ··· 281 281 pds->bid = ha->raw[i].local_no; 282 282 pds->first = 0; 283 283 pds->entries = ha->raw[i].pdev_cnt; 284 - cnt = (3*GDTH_SCRATCH/4 - 5 * sizeof(ulong32)) / 284 + cnt = (3*GDTH_SCRATCH/4 - 5 * sizeof(u32)) / 285 285 sizeof(pds->list[0]); 286 286 if (pds->entries > cnt) 287 287 pds->entries = cnt; ··· 604 604 605 605 size = sprintf(buffer+len, 606 606 " Capacity [MB]:\t%-6d \tStart Sector: \t%d\n", 607 - (ulong32)(ha->hdr[i].size/2048), ha->hdr[i].start_sec); 607 + (u32)(ha->hdr[i].size/2048), ha->hdr[i].start_sec); 608 608 len += size; pos = begin + len; 609 609 if (pos < offset) { 610 610 len = 0; ··· 664 664 } 665 665 666 666 static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch, 667 - ulong64 *paddr) 667 + u64 *paddr) 668 668 { 669 - ulong flags; 669 + unsigned long flags; 670 670 char *ret_val; 671 671 672 672 if (size == 0) ··· 691 691 return ret_val; 692 692 } 693 693 694 - static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr) 694 + static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, u64 paddr) 695 695 { 696 - ulong flags; 696 + unsigned long flags; 697 697 698 698 if (buf == ha->pscratch) { 699 699 spin_lock_irqsave(&ha->smp_lock, flags); ··· 705 705 } 706 706 707 707 #ifdef GDTH_IOCTL_PROC 708 - static int gdth_ioctl_check_bin(gdth_ha_str *ha, ushort size) 708 + static int gdth_ioctl_check_bin(gdth_ha_str *ha, u16 size) 709 709 { 710 - ulong flags; 710 + unsigned long flags; 711 711 int ret_val; 712 712 713 713 spin_lock_irqsave(&ha->smp_lock, flags); 714 714 715 715 ret_val = FALSE; 716 716 if (ha->scratch_busy) { 717 - if (((gdth_iord_str *)ha->pscratch)->size == (ulong32)size) 717 + if (((gdth_iord_str *)ha->pscratch)->size == (u32)size) 718 718 ret_val = TRUE; 719 719 } 720 720 spin_unlock_irqrestore(&ha->smp_lock, flags); ··· 724 724 725 725 static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id) 726 726 { 727 - ulong flags; 727 + unsigned long flags; 728 728 int i; 729 729 Scsi_Cmnd *scp; 730 730 struct gdth_cmndinfo *cmndinfo; 731 - unchar b, t; 731 + u8 b, t; 732 732 733 733 spin_lock_irqsave(&ha->smp_lock, flags); 734 734 ··· 738 738 739 739 b = scp->device->channel; 740 740 t = scp->device->id; 741 - if (!SPECIAL_SCP(scp) && t == (unchar)id && 742 - b == (unchar)busnum) { 741 + if (!SPECIAL_SCP(scp) && t == (u8)id && 742 + b == (u8)busnum) { 743 743 cmndinfo->wait_for_completion = 0; 744 744 spin_unlock_irqrestore(&ha->smp_lock, flags); 745 745 while (!cmndinfo->wait_for_completion)
+2 -2
drivers/scsi/gdth_proc.h
··· 17 17 int length, gdth_ha_str *ha); 18 18 19 19 static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch, 20 - ulong64 *paddr); 21 - static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr); 20 + u64 *paddr); 21 + static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, u64 paddr); 22 22 static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id); 23 23 24 24 #endif