ida_pci.c (d4fcf3cba56369bf27a1943ee07b2ddd124b8436) | ida_pci.c (ef544f631226436ef590825881e7a28369df82f6) |
---|---|
1/*- 2 * Copyright (c) 1999,2000 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 284 unchanged lines hidden (view full) --- 293 ida->irq_res_type = SYS_RES_IRQ; 294 ida->irq = bus_alloc_resource_any(dev, ida->irq_res_type, &rid, 295 RF_ACTIVE | RF_SHAREABLE); 296 if (ida->irq == NULL) { 297 ida_free(ida); 298 return (ENOMEM); 299 } 300 error = bus_setup_intr(dev, ida->irq, INTR_TYPE_BIO | INTR_ENTROPY, | 1/*- 2 * Copyright (c) 1999,2000 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 284 unchanged lines hidden (view full) --- 293 ida->irq_res_type = SYS_RES_IRQ; 294 ida->irq = bus_alloc_resource_any(dev, ida->irq_res_type, &rid, 295 RF_ACTIVE | RF_SHAREABLE); 296 if (ida->irq == NULL) { 297 ida_free(ida); 298 return (ENOMEM); 299 } 300 error = bus_setup_intr(dev, ida->irq, INTR_TYPE_BIO | INTR_ENTROPY, |
301 ida_intr, ida, &ida->ih); | 301 NULL, ida_intr, ida, &ida->ih); |
302 if (error) { 303 device_printf(dev, "can't setup interrupt\n"); 304 ida_free(ida); 305 return (ENOMEM); 306 } 307 308 error = ida_init(ida); 309 if (error) { 310 ida_free(ida); 311 return (error); 312 } 313 ida_attach(ida); 314 ida->flags |= IDA_ATTACHED; 315 316 return (0); 317} 318 319DRIVER_MODULE(ida, pci, ida_pci_driver, ida_devclass, 0, 0); | 302 if (error) { 303 device_printf(dev, "can't setup interrupt\n"); 304 ida_free(ida); 305 return (ENOMEM); 306 } 307 308 error = ida_init(ida); 309 if (error) { 310 ida_free(ida); 311 return (error); 312 } 313 ida_attach(ida); 314 ida->flags |= IDA_ATTACHED; 315 316 return (0); 317} 318 319DRIVER_MODULE(ida, pci, ida_pci_driver, ida_devclass, 0, 0); |