Index: smartmontools/Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v retrieving revision 1.59 diff -u -r1.59 Makefile --- smartmontools/Makefile 19 Jun 2012 20:36:11 -0000 1.59 +++ smartmontools/Makefile 2 Jul 2012 09:05:33 -0000 @@ -6,8 +6,8 @@ # PORTNAME= smartmontools -PORTVERSION= 5.42 -PORTREVISION= 4 +PORTVERSION= 5.43 +PORTREVISION= 0 CATEGORIES= sysutils MASTER_SITES= SF Index: smartmontools/distinfo =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/distinfo,v retrieving revision 1.18 diff -u -r1.18 distinfo --- smartmontools/distinfo 23 Oct 2011 13:16:19 -0000 1.18 +++ smartmontools/distinfo 2 Jul 2012 09:05:33 -0000 @@ -1,2 +1,2 @@ -SHA256 (smartmontools-5.42.tar.gz) = b664d11e814e114ce3a32a4fa918c9e649c684e2897c007b2a8b92574decc374 -SIZE (smartmontools-5.42.tar.gz) = 742138 +SHA256 (smartmontools-5.43.tar.gz) = d845187d1500b87ef8d2c43772bd0218a59114fe58474a903c56777c9175351e +SIZE (smartmontools-5.43.tar.gz) = 767978 Index: smartmontools/files/patch-atacam =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/files/patch-atacam,v retrieving revision 1.1 diff -u -r1.1 patch-atacam --- smartmontools/files/patch-atacam 19 Jun 2012 20:36:11 -0000 1.1 +++ smartmontools/files/patch-atacam 2 Jul 2012 09:05:33 -0000 @@ -1,25 +1,15 @@ ---- os_freebsd.cpp 2012-05-31 17:43:19.000000000 +0400 -+++ os_freebsd.cpp 2012-05-31 17:45:44.000000000 +0400 -@@ -1749,8 +1769,7 @@ - if (ccb.cdm.matches[i].type == DEV_MATCH_BUS) { - bus_result = &ccb.cdm.matches[i].result.bus_result; - -- if (strcmp(bus_result->dev_name,"ata") == 0 /* ATAPICAM devices will be probed as ATA devices, skip'em there */ -- || strcmp(bus_result->dev_name,"xpt") == 0) /* skip XPT bus at all */ -+ if (strcmp(bus_result->dev_name,"xpt") == 0) /* skip XPT bus at all */ - skip_bus = 1; - else - skip_bus = 0; -@@ -1773,8 +1792,10 @@ +--- os_freebsd.cpp 2012-06-19 13:37:05.000000000 -0700 ++++ os_freebsd.cpp 2012-07-02 01:51:10.998181000 -0700 +@@ -1795,8 +1795,10 @@ * We are searching for latest name */ periph_result = &ccb.cdm.matches[i].result.periph_result; - devname = strprintf("%s%s%d", _PATH_DEV, periph_result->periph_name, periph_result->unit_number); - changed = 0; -+ if (strcmp(periph_result->periph_name, "pass")) { -+ devname = strprintf("%s%s%d", _PATH_DEV, periph_result->periph_name, periph_result->unit_number); -+ changed = 0; -+ } ++ if (strcmp(periph_result->periph_name, "pass")) { ++ devname = strprintf("%s%s%d", _PATH_DEV, periph_result->periph_name, periph_result->unit_number); ++ changed = 0; ++ } }; if ((changed == 1 || show_all) && !devname.empty()) { names.push_back(devname); Index: smartmontools/files/patch-freebsd9 =================================================================== RCS file: smartmontools/files/patch-freebsd9 diff -N smartmontools/files/patch-freebsd9 --- smartmontools/files/patch-freebsd9 3 Nov 2011 22:13:21 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ ---- os_freebsd.cpp 2011/11/03 17:50:35 3466 -+++ os_freebsd.cpp 2011/11/03 20:06:19 3468 -@@ -1058,8 +1058,8 @@ - } - - if (iop->sensep) { -- memcpy(iop->sensep,&(ccb->csio.sense_data),sizeof(struct scsi_sense_data)); -- iop->resp_sense_len = sizeof(struct scsi_sense_data); -+ iop->resp_sense_len = ccb->csio.sense_len - ccb->csio.sense_resid; -+ memcpy(iop->sensep,&(ccb->csio.sense_data),iop->resp_sense_len); - } - - iop->scsi_status = ccb->csio.scsi_status; Index: smartmontools/files/patch-lsibugs =================================================================== RCS file: smartmontools/files/patch-lsibugs diff -N smartmontools/files/patch-lsibugs --- smartmontools/files/patch-lsibugs 3 Nov 2011 22:13:21 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,44 +0,0 @@ ---- os_freebsd.cpp 2011/10/06 16:43:44 3423 -+++ os_freebsd.cpp 2011/11/03 17:50:35 3466 -@@ -1013,6 +1013,20 @@ - warnx("error allocating ccb"); - return -ENOMEM; - } -+ // mfi SAT layer is known to be buggy -+ if(!strcmp("mfi",m_camdev->sim_name)) { -+ if (iop->cmnd[0] == SAT_ATA_PASSTHROUGH_12 || iop->cmnd[0] == SAT_ATA_PASSTHROUGH_16) { -+ // Controller does not return ATA output registers in SAT sense data -+ if (iop->cmnd[2] & (1 << 5)) // chk_cond -+ return set_err(ENOSYS, "ATA return descriptor not supported by controller firmware"); -+ } -+ // SMART WRITE LOG SECTOR causing media errors -+ if ((iop->cmnd[0] == SAT_ATA_PASSTHROUGH_16 && iop->cmnd[14] == ATA_SMART_CMD -+ && iop->cmnd[3]==0 && iop->cmnd[4] == ATA_SMART_WRITE_LOG_SECTOR) || -+ (iop->cmnd[0] == SAT_ATA_PASSTHROUGH_12 && iop->cmnd[9] == ATA_SMART_CMD && -+ iop->cmnd[3] == ATA_SMART_WRITE_LOG_SECTOR)) -+ return set_err(ENOSYS, "SMART WRITE LOG SECTOR command is not supported by controller firmware"); -+ } - - // clear out structure, except for header that was filled in for us - bzero(&(&ccb->ccb_h)[1], -@@ -1590,12 +1604,18 @@ - return this; - } - -- // SAT or USB ? -+ // SAT or USB, skip MFI controllers because of bugs - { - smart_device * newdev = smi()->autodetect_sat_device(this, req_buff, len); -- if (newdev) -+ if (newdev) { - // NOTE: 'this' is now owned by '*newdev' -+ if(!strcmp("mfi",m_camdev->sim_name)) { -+ newdev->close(); -+ newdev->set_err(ENOSYS, "SATA device detected,\n" -+ "MegaRAID SAT layer is reportedly buggy, use '-d sat' to try anyhow"); -+ } - return newdev; -+ } - } - - // Nothing special found \ No newline at end of file