View | Details | Raw Unified | Return to bug 125496
Collapse All | Expand All

(-)src/sys/dev/ata/ata-raid.c (-1 / +10 lines)
Lines 4205-4211 DRIVER_MODULE(subdisk, ad, ata_raid_sub_ Link Here
4205
static int
4205
static int
4206
ata_raid_module_event_handler(module_t mod, int what, void *arg)
4206
ata_raid_module_event_handler(module_t mod, int what, void *arg)
4207
{
4207
{
4208
    int i;
4208
    device_t subdisk;
4209
    struct ata_raid_subdisk *ars;
4210
    int i, disk;
4209
4211
4210
    switch (what) {
4212
    switch (what) {
4211
    case MOD_LOAD:
4213
    case MOD_LOAD:
Lines 4244-4249 ata_raid_module_event_handler(module_t m Link Here
4244
		mtx_destroy(&rdp->lock);
4246
		mtx_destroy(&rdp->lock);
4245
	    if (rdp->disk)
4247
	    if (rdp->disk)
4246
		disk_destroy(rdp->disk);
4248
		disk_destroy(rdp->disk);
4249
	    for (disk = 0; disk < rdp->total_disks; disk++) {
4250
		subdisk = devclass_get_device(ata_raid_sub_devclass,
4251
				device_get_unit(rdp->disks[disk].dev));
4252
		if (subdisk && (ars = device_get_softc(subdisk)))
4253
		    ars->raid[rdp->volume] = NULL;
4254
	    }
4255
	    free(rdp, M_AR);
4247
	}
4256
	}
4248
	if (testing || bootverbose)
4257
	if (testing || bootverbose)
4249
	    printf("ATA PseudoRAID unloaded\n");
4258
	    printf("ATA PseudoRAID unloaded\n");

Return to bug 125496