Re: Cosmetic path to bsdinstall
On Thu, Feb 24, 2011 at 12:17:46PM -0800, Garrett Cooper wrote: > On Wed, Feb 23, 2011 at 4:37 AM, Mitya wrote: > > Add usually used RAID controller > > > > --- usr.sbin/bsdinstall/partedit/part_wizard.c.orig ? ?2011-02-19 > > 17:22:06.0 +0200 > > +++ usr.sbin/bsdinstall/partedit/part_wizard.c ? ?2011-02-21 > > 17:20:28.0 +0200 > > @@ -122,6 +122,18 @@ > > ? ? ? ? ? ? ? ? ? ? strcat(diskdesc, " ATA Hard Disk"); > > ? ? ? ? ? ? ? ? else if (strncmp(pp->lg_name, "da", 2) == 0) > > ? ? ? ? ? ? ? ? ? ? strcat(diskdesc, " SCSI Hard Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "aacd", 4) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " Adaptec Raid Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "amrd", 4) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " LSI Raid Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "mfid", 4) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " LSI Raid Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "mlxd", 4) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " Mylex Raid Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "twed", 4) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " 3ware Raid Disk"); > > + ? ? ? ? ? ? ? ?else if (strncmp(pp->lg_name, "pst", 3) == 0) > > + ? ? ? ? ? ? ? ? ? ?strcat(diskdesc, " Promise Raid Disk"); > > ? ? ? ? ? ? ? ? else if (strncmp(pp->lg_name, "md", 2) == 0) > > ? ? ? ? ? ? ? ? ? ? strcat(diskdesc, " Memory Disk"); > > ? ? ? ? ? ? ? ? else if (strncmp(pp->lg_name, "cd", 2) == 0) { > > You forgot "twad" :). AFAIK the 3ware devices that attach with the twa driver register the volumes through CAM and appear as da, not twad. Hence why the driver is in the "RAID controllers interfaced to the SCSI subsystem" section of GENERIC Regards, Gary ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On 02/24/11 16:07, John Baldwin wrote: On Thursday, February 24, 2011 3:35:51 pm Nathan Whitehorn wrote: On 02/24/11 14:14, John Baldwin wrote: On Thursday, February 24, 2011 10:00:44 am Nathan Whitehorn wrote: Thanks! I've received basically this patch from a couple people now. I'm going to investigate whether this is a more generic way to get this information (so the list doesn't grow infinitely long), and will commit this if I can't. Having CAM devices be part of newbus would simplify this a very great deal... Note that all these disk devices are not CAM devices, so CAM changing to use new-bus wouldn't really matter one whit. They do all show up as 'DISK' GEOM's however (I also hacked on a GEOM-based libdisk replacement at one point, though probably less developed than Marcel's. I used libgeom to discover DISK devices.) Given that disk_create() already hooks into GEOM, that is probably the right way to discover disks in a generic fashion. Right, stepping through that is how I build the list. Adding a device description to the XML actually seems like a good idea (and maybe the drive serial number?). Would anyone have any objections to me starting to go through and do that? I think that would be fine, but I don't think GEOM knows about those properties yet? It doesn't, but the attached patch changes that. I've added a new field to struct disk (d_descr) meant to hold a human-readable description of the disk, and changed several drivers (cd, ada, ad) to fill it with their model strings. I've also modified geom_disk's config XML to report the disk ident and description. If there aren't any objections, I'll commit this at the end of the day. -Nathan Index: cam/scsi/scsi_cd.c === --- cam/scsi/scsi_cd.c (revision 219031) +++ cam/scsi/scsi_cd.c (working copy) @@ -724,6 +724,12 @@ softc->disk->d_strategy = cdstrategy; softc->disk->d_ioctl = cdioctl; softc->disk->d_name = "cd"; + cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, + sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr)); + strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); + cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], + cgd->inq_data.product, sizeof(cgd->inq_data.product), + sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); softc->disk->d_unit = periph->unit_number; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) Index: cam/ata/ata_da.c === --- cam/ata/ata_da.c(revision 219031) +++ cam/ata/ata_da.c(working copy) @@ -746,6 +746,8 @@ softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); + strlcpy(softc->disk->d_descr, cgd->ident_data.model, + MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); softc->disk->d_hba_vendor = cpi.hba_vendor; softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; Index: dev/ata/ata-disk.c === --- dev/ata/ata-disk.c (revision 219031) +++ dev/ata/ata-disk.c (working copy) @@ -145,6 +145,8 @@ adp->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(adp->disk->d_ident, atadev->param.serial, sizeof(adp->disk->d_ident)); +strlcpy(adp->disk->d_descr, atadev->param.model, + sizeof(adp->disk->d_descr)); parent = device_get_parent(ch->dev); if (parent != NULL && device_get_parent(parent) != NULL && (device_get_devclass(parent) == Index: geom/geom_disk.c === --- geom/geom_disk.c(revision 219031) +++ geom/geom_disk.c(working copy) @@ -371,6 +371,8 @@ indent, dp->d_fwheads); sbuf_printf(sb, "%s%u\n", indent, dp->d_fwsectors); + sbuf_printf(sb, "%s%s\n", indent, dp->d_ident); + sbuf_printf(sb, "%s%s\n", indent, dp->d_descr); } } Index: geom/geom_disk.h === --- geom/geom_disk.h(revision 219031) +++ geom/geom_disk.h(working copy) @@ -85,6 +85,7 @@ u_int d_stripeoffset; u_int d_stripesize; chard_ident[DISK_IDENT_SIZE]; + chard_descr[DISK_IDENT_SIZE]; uint16_td_hba_vendor; uint16_td_hba_device; uint16_td_hba_subvendor; ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail
TODOs for suspend/resume (Re: Cosmetic path to bsdinstall)
On Thursday 24 February 2011 04:53 pm, Brandon Gooch wrote: > On Feb 24, 2011, at 2:44 PM, Bruce Cran wrote: > > On Thu, 24 Feb 2011 15:38:15 -0500 > > > > Jung-uk Kim wrote: > >> FYI, I've been using the following hack for a while now: > >> > >> http://people.freebsd.org/~jkim/ada_suspend.diff > > > > Thanks, I'd given up trying to fix this because I was under the > > impression it needed newbus. I'll see if I can get something > > similar committed so at least another part of suspend/resume > > works. > > > > I think someone mentioned there was documentation somewhere that > > was going to be put on the Wiki about what needs done in order to > > get suspend/resume working properly. Does anyone know where that > > might be? > > > > -- > > Bruce Cran > > I'd also be interested in reading about this, as I often field > questions from my colleagues... I am not aware of such documentation. Mostly the problem is in device drivers. Someone should start a list of misbehaving device drivers first if needed. However, it is not easy because several layers are involved, i.e., bus drivers (acpi, isa, pci, usb, ...) and their children (acpi_video, atkbdc, ath, ums...) and we don't know for sure what's to blame. Also, many complaints are related to GPU issues. Currently, we rely on simple VGA registers or VESA BIOS (if vesa.ko is loaded) but many modern GPUs simply don't care about these any more. So, we need GPU-specific drivers (as Linux does it via KMS nowadays). The only workaround for these problems is using X.org with "right" device drivers ATM. Jung-uk Kim ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thursday, February 24, 2011 3:35:51 pm Nathan Whitehorn wrote: > On 02/24/11 14:14, John Baldwin wrote: > > On Thursday, February 24, 2011 10:00:44 am Nathan Whitehorn wrote: > >> Thanks! I've received basically this patch from a couple people now. I'm > >> going to investigate whether this is a more generic way to get this > >> information (so the list doesn't grow infinitely long), and will commit > >> this if I can't. Having CAM devices be part of newbus would simplify > >> this a very great deal... > > Note that all these disk devices are not CAM devices, so CAM changing to > > use new-bus wouldn't really matter one whit. They do all show up as 'DISK' > > GEOM's however (I also hacked on a GEOM-based libdisk replacement at one > > point, though probably less developed than Marcel's. I used libgeom to > > discover DISK devices.) Given that disk_create() already hooks into GEOM, > > that is probably the right way to discover disks in a generic fashion. > > Right, stepping through that is how I build the list. Adding a device > description to the XML actually seems like a good idea (and maybe the > drive serial number?). Would anyone have any objections to me starting > to go through and do that? I think that would be fine, but I don't think GEOM knows about those properties yet? -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Feb 24, 2011, at 2:44 PM, Bruce Cran wrote: > On Thu, 24 Feb 2011 15:38:15 -0500 > Jung-uk Kim wrote: > >> FYI, I've been using the following hack for a while now: >> >> http://people.freebsd.org/~jkim/ada_suspend.diff > > Thanks, I'd given up trying to fix this because I was under the > impression it needed newbus. I'll see if I can get something similar > committed so at least another part of suspend/resume works. > > I think someone mentioned there was documentation somewhere that was > going to be put on the Wiki about what needs done in order to get > suspend/resume working properly. Does anyone know where that might be? > > -- > Bruce Cran > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" I'd also be interested in reading about this, as I often field questions from my colleagues... -Brandon ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thu, 24 Feb 2011 15:38:15 -0500 Jung-uk Kim wrote: > FYI, I've been using the following hack for a while now: > > http://people.freebsd.org/~jkim/ada_suspend.diff Thanks, I'd given up trying to fix this because I was under the impression it needed newbus. I'll see if I can get something similar committed so at least another part of suspend/resume works. I think someone mentioned there was documentation somewhere that was going to be put on the Wiki about what needs done in order to get suspend/resume working properly. Does anyone know where that might be? -- Bruce Cran ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thursday 24 February 2011 03:11 pm, John Baldwin wrote: > On Thursday, February 24, 2011 10:27:59 am Bruce Cran wrote: > > On Thu, 24 Feb 2011 09:00:44 -0600 > > > > Nathan Whitehorn wrote: > > > Having CAM devices be part of newbus would > > > simplify this a very great deal... > > > > It's required if we're ever going to have suspend/resume working > > properly because currently CAM doesn't get a suspend > > notification, so doesn't know to spin-down disks etc. > > The controllers get a suspend notification though (via > device_suspend() hooks that drivers like mpt, etc. could register > for) and could then use that to post a suspend of the associated > buses. That doesn't require CAM to use new-bus though. FYI, I've been using the following hack for a while now: http://people.freebsd.org/~jkim/ada_suspend.diff Jung-uk Kim ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On 02/24/11 14:14, John Baldwin wrote: On Thursday, February 24, 2011 10:00:44 am Nathan Whitehorn wrote: Thanks! I've received basically this patch from a couple people now. I'm going to investigate whether this is a more generic way to get this information (so the list doesn't grow infinitely long), and will commit this if I can't. Having CAM devices be part of newbus would simplify this a very great deal... Note that all these disk devices are not CAM devices, so CAM changing to use new-bus wouldn't really matter one whit. They do all show up as 'DISK' GEOM's however (I also hacked on a GEOM-based libdisk replacement at one point, though probably less developed than Marcel's. I used libgeom to discover DISK devices.) Given that disk_create() already hooks into GEOM, that is probably the right way to discover disks in a generic fashion. Right, stepping through that is how I build the list. Adding a device description to the XML actually seems like a good idea (and maybe the drive serial number?). Would anyone have any objections to me starting to go through and do that? -Nathan ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Wed, Feb 23, 2011 at 4:37 AM, Mitya wrote: > Add usually used RAID controller > > --- usr.sbin/bsdinstall/partedit/part_wizard.c.orig 2011-02-19 > 17:22:06.0 +0200 > +++ usr.sbin/bsdinstall/partedit/part_wizard.c 2011-02-21 > 17:20:28.0 +0200 > @@ -122,6 +122,18 @@ > strcat(diskdesc, " ATA Hard Disk"); > else if (strncmp(pp->lg_name, "da", 2) == 0) > strcat(diskdesc, " SCSI Hard Disk"); > + else if (strncmp(pp->lg_name, "aacd", 4) == 0) > + strcat(diskdesc, " Adaptec Raid Disk"); > + else if (strncmp(pp->lg_name, "amrd", 4) == 0) > + strcat(diskdesc, " LSI Raid Disk"); > + else if (strncmp(pp->lg_name, "mfid", 4) == 0) > + strcat(diskdesc, " LSI Raid Disk"); > + else if (strncmp(pp->lg_name, "mlxd", 4) == 0) > + strcat(diskdesc, " Mylex Raid Disk"); > + else if (strncmp(pp->lg_name, "twed", 4) == 0) > + strcat(diskdesc, " 3ware Raid Disk"); > + else if (strncmp(pp->lg_name, "pst", 3) == 0) > + strcat(diskdesc, " Promise Raid Disk"); > else if (strncmp(pp->lg_name, "md", 2) == 0) > strcat(diskdesc, " Memory Disk"); > else if (strncmp(pp->lg_name, "cd", 2) == 0) { You forgot "twad" :). Thanks, -Garrett ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thursday, February 24, 2011 10:27:59 am Bruce Cran wrote: > On Thu, 24 Feb 2011 09:00:44 -0600 > Nathan Whitehorn wrote: > > > Having CAM devices be part of newbus would > > simplify this a very great deal... > > It's required if we're ever going to have suspend/resume working > properly because currently CAM doesn't get a suspend notification, so > doesn't know to spin-down disks etc. The controllers get a suspend notification though (via device_suspend() hooks that drivers like mpt, etc. could register for) and could then use that to post a suspend of the associated buses. That doesn't require CAM to use new-bus though. -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thursday, February 24, 2011 10:00:44 am Nathan Whitehorn wrote: > Thanks! I've received basically this patch from a couple people now. I'm > going to investigate whether this is a more generic way to get this > information (so the list doesn't grow infinitely long), and will commit > this if I can't. Having CAM devices be part of newbus would simplify > this a very great deal... Note that all these disk devices are not CAM devices, so CAM changing to use new-bus wouldn't really matter one whit. They do all show up as 'DISK' GEOM's however (I also hacked on a GEOM-based libdisk replacement at one point, though probably less developed than Marcel's. I used libgeom to discover DISK devices.) Given that disk_create() already hooks into GEOM, that is probably the right way to discover disks in a generic fashion. -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Feb 24, 2011, at 7:00 AM, Nathan Whitehorn wrote: > Thanks! I've received basically this patch from a couple people now. I'm > going to investigate whether this is a more generic way to get this > information (so the list doesn't grow infinitely long), and will commit this > if I can't. Having CAM devices be part of newbus would simplify this a very > great deal... See: http://people.freebsd.org/~marcel/gpt.diff It was my initial attempt of creating a generic (ncurses-based) partition editor that uses gpart. (the name of the patch relates to the perforce branch it was done on, not the partitioning scheme). In it you'll find a diff for sbin/pe/disk.c that contains logic for presenting a friendly "disk" name. Not complete, but maybe good for inspiration... FYI, -- Marcel Moolenaar xcl...@mac.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
On Thu, 24 Feb 2011 09:00:44 -0600 Nathan Whitehorn wrote: > Having CAM devices be part of newbus would > simplify this a very great deal... It's required if we're ever going to have suspend/resume working properly because currently CAM doesn't get a suspend notification, so doesn't know to spin-down disks etc. -- Bruce Cran ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Cosmetic path to bsdinstall
Thanks! I've received basically this patch from a couple people now. I'm going to investigate whether this is a more generic way to get this information (so the list doesn't grow infinitely long), and will commit this if I can't. Having CAM devices be part of newbus would simplify this a very great deal... -Nathan On 02/23/11 06:37, Mitya wrote: Add usually used RAID controller --- usr.sbin/bsdinstall/partedit/part_wizard.c.orig2011-02-19 17:22:06.0 +0200 +++ usr.sbin/bsdinstall/partedit/part_wizard.c2011-02-21 17:20:28.0 +0200 @@ -122,6 +122,18 @@ strcat(diskdesc, " ATA Hard Disk"); else if (strncmp(pp->lg_name, "da", 2) == 0) strcat(diskdesc, " SCSI Hard Disk"); +else if (strncmp(pp->lg_name, "aacd", 4) == 0) +strcat(diskdesc, " Adaptec Raid Disk"); +else if (strncmp(pp->lg_name, "amrd", 4) == 0) +strcat(diskdesc, " LSI Raid Disk"); +else if (strncmp(pp->lg_name, "mfid", 4) == 0) +strcat(diskdesc, " LSI Raid Disk"); +else if (strncmp(pp->lg_name, "mlxd", 4) == 0) +strcat(diskdesc, " Mylex Raid Disk"); +else if (strncmp(pp->lg_name, "twed", 4) == 0) +strcat(diskdesc, " 3ware Raid Disk"); +else if (strncmp(pp->lg_name, "pst", 3) == 0) +strcat(diskdesc, " Promise Raid Disk"); else if (strncmp(pp->lg_name, "md", 2) == 0) strcat(diskdesc, " Memory Disk"); else if (strncmp(pp->lg_name, "cd", 2) == 0) { ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Cosmetic path to bsdinstall
Add usually used RAID controller --- usr.sbin/bsdinstall/partedit/part_wizard.c.orig2011-02-19 17:22:06.0 +0200 +++ usr.sbin/bsdinstall/partedit/part_wizard.c2011-02-21 17:20:28.0 +0200 @@ -122,6 +122,18 @@ strcat(diskdesc, " ATA Hard Disk"); else if (strncmp(pp->lg_name, "da", 2) == 0) strcat(diskdesc, " SCSI Hard Disk"); +else if (strncmp(pp->lg_name, "aacd", 4) == 0) +strcat(diskdesc, " Adaptec Raid Disk"); +else if (strncmp(pp->lg_name, "amrd", 4) == 0) +strcat(diskdesc, " LSI Raid Disk"); +else if (strncmp(pp->lg_name, "mfid", 4) == 0) +strcat(diskdesc, " LSI Raid Disk"); +else if (strncmp(pp->lg_name, "mlxd", 4) == 0) +strcat(diskdesc, " Mylex Raid Disk"); +else if (strncmp(pp->lg_name, "twed", 4) == 0) +strcat(diskdesc, " 3ware Raid Disk"); +else if (strncmp(pp->lg_name, "pst", 3) == 0) +strcat(diskdesc, " Promise Raid Disk"); else if (strncmp(pp->lg_name, "md", 2) == 0) strcat(diskdesc, " Memory Disk"); else if (strncmp(pp->lg_name, "cd", 2) == 0) { ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"