diff options
author | mav <mav@FreeBSD.org> | 2015-08-29 10:52:16 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-08-29 10:52:16 +0000 |
commit | 73d1933c36a5329d77158dbc124a76eada079bf3 (patch) | |
tree | da47a7179cddbf605e580e5080748bbd841f784d /sys/dev/ata/ata-all.h | |
parent | 73eba52d267ae10896ebf8b8e692871e73465b48 (diff) | |
download | FreeBSD-src-73d1933c36a5329d77158dbc124a76eada079bf3.zip FreeBSD-src-73d1933c36a5329d77158dbc124a76eada079bf3.tar.gz |
MFC r286814, r286816: Remove UMA allocation of ATA requests.
After CAM replaced old ATA stack, this driver processes no more then one
request at a time per channel. Using UMA after that is overkill, so
replace it with simple preallocation of one request per channel.
Diffstat (limited to 'sys/dev/ata/ata-all.h')
-rw-r--r-- | sys/dev/ata/ata-all.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index 19cb7ef..cf8ed78 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -450,6 +450,7 @@ struct ata_channel { struct ata_cam_device curr[16]; /* Current settings */ int requestsense; /* CCB waiting for SENSE. */ struct callout poll_callout; /* Periodic status poll. */ + struct ata_request request; }; /* disk bay/enclosure related */ @@ -507,14 +508,6 @@ int ata_sata_getrev(device_t dev, int target); int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis); void ata_pm_identify(device_t dev); -/* macros for alloc/free of struct ata_request */ -extern uma_zone_t ata_request_zone; -#define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO) -#define ata_free_request(request) { \ - if (!(request->flags & ATA_R_DANGER2)) \ - uma_zfree(ata_request_zone, request); \ - } - MALLOC_DECLARE(M_ATA); /* misc newbus defines */ |